vscode-deploy-reloaded
vscode-deploy-reloaded copied to clipboard
deployOnSave and preprocessors
Description
Hello, I'm using 'deploy-reloaded' to sync my local files with FTP host. I usually work with SASS/SCSS, so if I edit *.scss files, then CSS file is generated automatically (in the same directory) by different plugin or task. But in this way option 'deployOnSave' will not work for CSS file (because actually, this file has not been 'saved', just generated).
Any idea how to deal with it? :)
Actual behavior
Only SASS/SCSS file will be uploaded to the server, CSS file stays locally.
Expected behavior
I think when we have option 'deployOnSave' and SCSS/SASS/LESS files are modified, then the plugin should also 'watch' changes in CSS files.
Steps to reproduce
Use 'deploy-reloaded' along with 'Live Sass Compiler'
Example config
"deploy.reloaded": { "ignore": [ "**/*.code-workspace", ], "packages": [ { "name": "Dkkadr", "deployOnSave": [ "dev" ], "syncWhenOpen": [ "dev" ], "removeOnChange": [ "dev" ], "button": true, } ], "targets": [ { "name": "dev", "type": "ftp", ..... "checkBeforeDeploy": true, "checkBeforePull": true, }, ] }
Regards :)
I managed to make this working, here's my config:
{
"deploy.reloaded": {
"deployOnSaveButton": true,
"packages": [{
"name": "my-server",
"deployOnChange": true,
"removeOnChange": true,
"files": [
"**"
],
"targets": ["my-server"],
}
],
"targets": [{
"type": "sftp",
"name": "my-server",
}]
}
}
CSS is generated via node-sass
:
"scripts": {
"sass": "node-sass style.scss --output . --output-style compressed",
"sass:watch": "npm run sass -- --watch"
},