Closed glebm closed 9 years ago
SASS inherently does not compile partials (assuming you use the _partial.s(ac)ss convention).
This library (obviously) follows that same convention. You only need to send this module your non partial files, and your output files.
Sent from my iPhone
On Jan 18, 2015, at 8:07 PM, Gleb Mazovetskiy notifications@github.com wrote:
I am developing a Sass library that consists only of partials. However, it seems impossible to use grunt-contrib-sass to compile non-partials.
The reasons I want only partials in the library:
Sass --watch outputs all non-prefixed files as separate CSS files. E.g. if a user copies my library directly into the project, then imports it into their scss/main.scss, and runs sass --watch: $ sass --watch scss:public
write public/main.css write public/library.css Compass copies all non-partials in the libraries into the project when the library is added: $ compass compile modified config.rb ... write stylesheets/screen.css directory stylesheets/library write stylesheets/library/library.css — Reply to this email directly or view it on GitHub.
SASS inherently does not compile partials (assuming you use the _partial.s(ac)ss convention).
Sass can compile partials:
$ sass tmp/_test.sass # works
The problem is that this task don't know whether a glob or specific file where used as grunt does the globbing and just passes down a list of files. Just import your partials into a normal Sass file and compile that instead.
This would require a new option to override the behaviour (e.g. compilePartials: true
). I'll see if I can PR this soon.
Sass will compile anything you pass it, but the idea of a partial is that you import it into another file.
If you were to use --update
or --watch
and pass your input and output directory then you'd see That Sass does not compile partials, it compiles the files that import said partials.
I am developing a Sass library that consists only of partials. However, it seems impossible to use grunt-contrib-sass to compile non-partials.
The reasons I want only partials in the library:
--watch
outputs all non-prefixed files as separate CSS files. E.g. if a user copies my library directly into the project, then imports it into theirscss/main.scss
, and runssass --watch
:Sister ticket: https://github.com/sindresorhus/grunt-sass/issues/176