简体   繁体   中英

Grunt Live Reload after File Upload

I am using:

  • Grunt with the watch plugin for live reload &
  • Sublime Text 2's SFTP plugin for uploading files on save

Live reload is just a little quicker than the SFTP upload.

Using Guard, you could set a grace_period to delay the live reload. Is there an equivalent feature/work-around for Grunt?

You can use grunt-ftp-deploy with watch plugin instead of relying on Sublime Text . That way you could synchronize your actions .

npm install grunt-ftp-deploy

Usage Example :

ftp-deploy: {
    build: {
        auth: {
             host: 'server.com',
             port: 21,
             authKey: 'key1'
        },
        src: 'path/to/source/folder',
        dest: '/path/to/destination/folder'
   }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM