Sass Autocompile : compilation path by project?


#1

Hi,

I wonder if it was possible to choose which path we want to apply for compilation with the sass-autocompile package, depending of the current project ?

In fact, I have many projects which don’t have the same dev hierarchy (depending on the technology, React, Wordpress…), so sometimes I need to compile my sass directly in a current directory, sometimes in another parent folder, sometime totally elsewhere… The problem is that Atom can store only one path at the same time, for all projects, in the package manager ( > sass-autocompile > settings > “filename patern for ‘compressed’ compiled files”…). So I wanted to know if it was possible to declare it for the current project folder only, maybe with a config file or something I’d not know …

Thank you in advance,

N.C.


#2

The sass-autocompile package does not appear to have been designed in a way that can support your needs. An alternative would be to use the official compiler and automate it with the Atom package process-palette, which will let you set up the command once and run it repeatedly, and you can have per-project configuration so you can have the same command string, but with different effects based on the contents of the process-palette.json file in the active project.

Once you have an Atom command (like what process-palette gives you), it’s a piece of cake to run it whenever a TextEditor is saved. You can make it discriminate based on the active grammar, as well, and that would probably be a good idea.


#3

Hi,

It would be a great idea to use the process-palette command, however it breaks the main utility of sass-autocompile, the fact is automatic compiling isn’t possible here : we need to run the command after each change. I’ll maybe use this solution whatever for light projects

Thank you for the share.

N.C.


#4

The package you speak of is not being serviced by the Atom development team. Have you had a conversation with the package developer yet?


#5

I addressed that in the second paragraph. You can compile automatically. Atom is completely open-source, so anything is possible, and process-palette was designed in a way where it’s exceptionally easy to set up complicated workflow tasks like what you want. You just have to be the one to tell the program how to do it, since the package that’s available isn’t set up to handle your particular needs.

Hell, if you tell me precisely what output patterns you want and under what conditions you want to trigger the compilation, I can give you the process-palette configuration files and init.coffee code to make that happen.