brackets-sftp-upload icon indicating copy to clipboard operation
brackets-sftp-upload copied to clipboard

No change detected on css when sass uses

Open Jordane-L opened this issue 11 years ago • 7 comments

Hi ;),

I don't think that's it just me who uses sass, I would like to use "upload on save" but when I'm editing an "_import.scss", my "main.scss" compile the file "main.css" but "SFTP-Upload" upload just "_import.scss" and not "main.css".

I think, since the file "main.css" was not saved then "SFTP-Upload" says that there is no change and therefore no upload. A solution ? ;)

Thanks

Jordane-L avatar Aug 18 '14 12:08 Jordane-L

There is several cases, for example "minify" for js files, Less and Sass. I looked into main.js from the extension and it should be possible (I think) to use some sort of mappings: if extension is .scss look for matching path with extension .css if extensions is .less look for matching path with extension .css if extension is .js look for matching path with .min.js

These files should be available in project files list (eg. ProjectManager.isWithinProject("app.min.js")), so no need for disc access. The matching pairs could be configurable or just be "as is".

lvansnippenburg avatar Aug 20 '14 13:08 lvansnippenburg

@lvansnippenburg that's a great hint! I was thinking about allowing user to set watch folders. One question: if the sass file is compiled in a external app (i.e. CodeKit), will it be included in ProjectManager? I noticed Brackets' latency in refreshing project tree...

bigeyex avatar Aug 20 '14 21:08 bigeyex

@bigeyex that indeed could be an issue. In most cases (imo) this shouldn't be an issue since Less, css and JS minification is/can be handled by Brackets extensions. I haven't seen a Sass bracket extension yet, but it must be on it's way. Considering the possibilities with Brackets (live preview) it is not a logical match with codekit anyway (most of codekit's functionality being duplicate to brackets functions or it's extensions). Seems to me that you can tell the issue with the latency in the read.me. Something such as "Please note that minified or compiled files will not be uploaded until the filetree in Brackets is updated."

lvansnippenburg avatar Aug 21 '14 11:08 lvansnippenburg

I think it would be better to have just another option similar to "Upload on Save" that reads "Upload on file change". Whenever you modify a file within the project the extension would just make an upload. This is extremely useful both in Sass as well as in images (E.g. you edit an image in Photoshop and save it, it could automatically be uploaded when it changes on the disk). Would love to see such a feature!

raduluchian avatar Nov 14 '14 14:11 raduluchian

@raduluchian "Upload on save" is rather "dangerous". Saving is not the same as "finished working on it". When I save something I do not want it to be sent to some place immediately as it might brake everything else ... Perhaps you have a good use case for this feature, but then that's a different feature then what is discussed in this thread and you should open a separate issue for it.

lvansnippenburg avatar Nov 14 '14 15:11 lvansnippenburg

Same question for less. The less file is upload, not the css compiled.

pit07 avatar Jun 01 '16 14:06 pit07

Does anyone have any work around for this issue? Currently uploading the compiled CSS by right clicking in the file tree

johnw6761 avatar Sep 20 '17 11:09 johnw6761