grunt-cbr-styles-bundles
v0.1.0
Published
Compiles LESS bundles from project's blocks library.
Downloads
2
Readme
#grunt-cbr-styles-bundles
- Look for bundles configs (
<%= paths.styles.src %>/bundles/**.json
) - Look for dependencies like mixins
<%= paths.styles.src %>/bundles/dependencies.json
- Find LESS blocks in the project library (
<%= paths.styles.src %>/blocks/
) and create CSS for every bundles
It's recommended to put blocks that are used on almost all pages in shared.json
bundle.
The task will put CSS files in <%= paths.styles.src %>
directory and LESS files in <%= paths.styles.src %>/__build
directory.
No options so far.
Installation
grunt.loadNpmTasks('grunt-cbr-styles-bundles');
Convention
_
prefix: file is generated and uglified/compressed automatically
__
prefix: file is generated automatically but NOT uglified/compressed
Dependencies
LESS and concat tasks
Example
dependencies.json (automatically included in all bundles)
{ "blocks": [ "../__paths.less", "../variables.less", "../mixins.less" ] }
shared.json
{ "blocks": [ "../reset.less", "../fonts.less", "../globals.less", "../layout.less",
"header/main.less",
"social-buttons/main.less",
"footer/main.less"
]
}
The task will create:
/__build/__shared.less
_shared.css # compressed CSS
__shared.css