Gulp can be used to automate file synchronisation. It monitors all front-end files (css, js, aspx, ascx, html) in the DEV directory, and synchronises the file into the (IIS) Websites directory on save of the file.
This means that upon editing these files in Visual Studio and saving (Ctrl-S), the file will automatically deploy to the local website.
Instructions:
- Create gulpfile.js to do the syncing in the project root directory
- Create install_gulp.bat in <root directory>/tools to install Gulp and all its dependencies
- Install Node.js (https://nodejs.org/)
- In an elevated command prompt, cd into the <project root>\tools directory
- Run install_gulp.bat
- cd.. to the root directory
- Enter gulp into the cmd prompt to run it
Gulp will need to be running (repeat step 7) to continue to monitor and sync files, This can be done by either creating a script or adding a task to the task scheduler.
No comments:
Post a Comment