Skip to main content
Participant
October 30, 2023
Question

Auto upload .css file generated by LESS compiler

  • October 30, 2023
  • 3 replies
  • 390 views

Hi,

I have "auto upload" activated on save but when I save a .less file and it's compiled, it won't upload the .css file and I have to do it manualy. Is it possible to fix that?

Thanks,

Nicolas

This topic has been closed for replies.

3 replies

Community Expert
October 30, 2023

Actually, I understand @Nicolas33259498hiyj 's productivity concerns. It's often frustrating to have to do, say, a Ctrl Shift U, just to upload a file, and then an F5 to refresh the browser just to check real-time refinement adaptations live on the production site.

So having to add a select a generated file in the file panel, just because the auto upload doesn't take it into account, quickly becomes restrictive.
That's why I've suggested opening up to a grunt/gulp solution, depending on the availability of packages that could be added to the final needs (image conversion, uglify script, concat javascript, and so on...).

Nancy OShea
Community Expert
Community Expert
October 30, 2023

Dreamweaver is in minimal maintainence status.  No new features will be added except essential security updates.

 

I manually select Scripts, Styles and Media folders from my Files Panel (F8) and hit the UP arrow to ensure they are transfered to my server.

 

 

 

 

Nancy O'Shea— Product User & Community Expert
Community Expert
October 30, 2023

By enabling upload on save on DW, the only thing you'll be doing, at least in your case, is uploading the .less source to the server...

Unfortunately, before DW went into minimal maintenance, the development teams didn't have time to finalize this feature.

 

Well, nothing's lost, but you'll have to develop this solution by yourself, based on Node.js. So once Node is running on your local machine :

  1.  Monitor changes in your local files, by using tool as gulp, grunt, nodemon, watch...
  2.  Ask to compile your .less files... using packages as less, node-sass, gulp-less...
  3.  Transfer files to server (not obly CSS, but also JS, HTML/PHP, .htaccess, .jpg, webp...all what you need) ... based on packages as gulp-rsync, grunt-rsync... depending on your initial tool.
  4. Then once it's done, reload all connected devices... browser-sync can be piloted by the Gulp plugin gulp-browser-sync, or with grunt-browser-sync if you wen grunt.

 

However, if you run that way, I'd advise you to disable compilation .less managed by DW, as well as upload on save... you'll avoid any artifacts that could become counterproductive.

Nancy OShea
Community Expert
Community Expert
October 30, 2023

I wonder how many Dreamweaver users have brought Node.js into their workflow. 

  • <5%
  • 10%
  • 25%
  • >25%

 

 

Nancy O'Shea— Product User & Community Expert