carrot / roots-css-pipeline

get your css together
Other
7 stars 9 forks source link

Auto-concatenation of style files #16

Open janwirth opened 9 years ago

janwirth commented 9 years ago

I have been working on this recently. It aims to improve stylus performance through reading the directory and concatenating the files before processing. Stylus seems to have performance issues when you have a large number of css files.

jescalan commented 9 years ago

Cool, interested to see more. Would be happy to look at a PR that does this.

janwirth commented 9 years ago

ofc I forgot to paste the link. Once I think it is a little mature I will look at how I can integrate this fairly simple technique with the roots-css-pipeline. https://github.com/FranzSkuffka/gulp-stylus-pipeline

janwirth commented 9 years ago

It seems that I should use the before_file compilation hook to concatenate the contents. Where does it make sense to implement the sorting?

jescalan commented 9 years ago

What sorting?

janwirth commented 9 years ago

When the files are concatenated automatically there must be an option to define the inclusion order. Otherwise settings.styl for example may be included after some file that needs access to variables that were defined in the settings, breaking the stylesheets. https://github.com/FranzSkuffka/gulp-stylus-pipeline/blob/master/lib/defaults.coffee

kylemac commented 9 years ago

@FranzSkuffka i think this section of the readme defines what you're asking about - https://github.com/carrot/roots-css-pipeline#specifying-files