grunt-bem-revised
Plugin for work with bem-tools from Grunt using BEM API. More info about BEM. More info about API. Read about API for know about necessary parameters for bem-tools methods.
Getting Started
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-bem-revised --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
Overview
In your project's Gruntfile, add a section named bem
to the data object passed into grunt.initConfig()
.
grunt
Options
method
Type: String
Default value: make
sub
Type: String
Default value: undefined
Sub method for api methods. Ex: BEM.decl.merge()
targets
Type: String
Default value: target's name
Build targets.
options.require
Type: String
Default value: bem
Path to require BEM library.
options.root
Type: String
Default value: .
Project root (cwd by default).
options.workers
Type: Integer
Default value: 10
Run number of workers.
options.force
Type: Boolean
Default value: False
Force rebuild.
options.verbosity
Type: String
Default value: info
Verbosity level (silly, verbose, info, warn, debug, error).
Usage Example
In this example, custom options are used to do build targets desktop.bundles
and touch.bundles
. BEM is installed as a local package.
grunt