Couple IDE's deployment with CLI operations?
Hi there,
I'm trying to run specific shell scripts whenever I deploy specific files. E.g., when I edit my CSS stylesheet and then click on "Deployment > Upload to default server", or do any other deployment; I want the CSS stylesheet to be minified first, and then only deploy the minified version onto the production environment. If I have written a shell script which does the CSS minification; how can I bind that to the deployment of a specific CSS file of my project?
Please sign in to leave a comment.
Hi there,
1. The IDE has File Watchers that execute whatever command you want on file modification (i.e on Save). Use it to compile and minify your CSS.
You can make 2 file watchers that will run one after another (1st to compile and 2nd to minify) or make a shell/batch script that will do that multi-step processing and use it in the file watcher as a program
2. If you set up the file watcher correctly (the "Output paths to refresh" is the key here -- they must point to the final/target files) and have enabled Automatic Deployment .. the IDE can then 1) run File Watcher on your source CSS file (that compiles/minifies) and when done -- upload modified files to your remote server.
Thank you! Can Automatic Deployment be enabled for specific local directories only? Your solution sounds great to us, but we do not want the entire project to be automatically deployed upon changes, only the ones affected by the process mentioned above.
You may configure a separate Deployment configuration for the specific local directory and set it as Default, so automatic deployment will cover only this configuration.