compiler construction - Sass --watch in particular order -
in textmate, .scss files in alphabetical order. compile them .css files.
sass --watch css/sass:css/compiled
i'm getting errors though because need variables, mixins , resets compiled first, followed rest of files.
how can set order in files compiled?
you have file structure this:
css/sass/main.scss css/sass/mixins.scss css/sass/print.scss css/sass/reset.scss css/sass/variables.scss
those files called partials. thing need add _
(underscore) before each filename, this:
css/sass/_main.scss css/sass/_mixins.scss css/sass/_print.scss css/sass/_reset.scss css/sass/_variables.scss
this tell sass not compile files separate .css files.
now want compile them single file. create new file, style.scss
(without underscore) here:
css/sass/style.scss
open , put partial files in desired order there:
@import "variables"; @import "mixins"; @import "reset"; @import "main"; @import "print";
note underscore @ beggining of file don't have in definition, sass handle you.
now can run
sass --watch css/sass:css/compiled
and sass compile content of partial files 1 single file located in
css/compiled/style.css
Comments
Post a Comment