Project configuration for Sass
See original GitHub issueI’d like to make a simple configuration system for running sass with the same options for a given project.
My proposal is to simply allow command line options to be specified in a hidden file called .sass
in the current working directory.
GLOBAL: [options for all core commands]
--update,--watch: [options for update or watch]
--update: [options for update]
--watch: [options for watch]
So for example:
GLOBAL: --compass -I ../my_library_of_sass -r ./some_custom_stuff
--update,--watch: from_dir:to_dir
--update: -t compressed
--watch: -t expanded --sourcemap
Then simple user commands can result in more complex, repeatable commands:
Typed | Command ran |
---|---|
sass --watch |
sass --compass -I ../my_library_of_sass -r ./some_custom_stuff --watch from_dir:to_dir -t expanded --sourcemap |
sass --update |
sass --compass -I ../my_library_of_sass -r ./some_custom_stuff --update from_dir:to_dir -t compressed |
sass -i |
sass -i --compass -I ../my_library_of_sass -r ./some_custom_stuff |
Any additional options typed by the user when issuing the command would simply go at the end. We could also create an option to ignore the .sass
file.
Anyways, this is a strawman. I’d like to see a way to establish reproducible sass compiles to enable team collaboration even if they don’t use compass. If there are other ideas for how to do this, let’s discuss them. However, I’d like to avoid making this a ruby file.
Issue Analytics
- State:
- Created 10 years ago
- Comments:21 (6 by maintainers)
Top Results From Across the Web
How to Set Your Project Up With Sass - DEV Community
Setup Your File Structure ⚙ · In your root directory, create a styles folder with an scss folder and a css folder ·...
Read more >Configuring and Using Sass - LearnHowToProgram.com
This lesson will address how to configure a project to use Sass, including necessary commands and files. Anatomy of a Sass Project. As...
Read more >Sass: Getting Started - Medium
We will be setting up our files using the 7–1 architecture. The 7–1 pattern has us create 7 folders and 1 main Sass...
Read more >How to Use Sass with CSS - freeCodeCamp
First, we'll download and install Node. Then we'll use the JavaScript package manager npm to install Sass and configure it in your project....
Read more >Sass Basics
Before you can use Sass, you need to set it up on your project. If you want to just browse here, go ahead,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any news to this? is it possible to use a config file with sass (no COMPASS or RAILS, so config.rb or environment.rb seems not to work). there is an Option Section in the docs (http://www.sass-lang.com/documentation/file.SASS_REFERENCE.html#options) but it seems that Sass::Plugin.options only work with RAILS/RACK. so when i use stand-alone sass can i use some config files to set Sass::Plugin.options or use environment variables?
thanxs
markus #
Closing this in favor of https://github.com/sass/sass/issues/2669, since the details are very different in a JS-centric world.