grunt-cbr-styles-bundles

0.1.0 • Public • Published

grunt-cbr-styles-bundles

  1. Look for bundles configs (<%= paths.styles.src %>/bundles/**.json)
  2. Look for dependencies like mixins <%= paths.styles.src %>/bundles/dependencies.json
  3. 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

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-cbr-styles-bundles

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • clexit