Warn if CSS file has more than equal 4096 selectors.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
test
.gitignore Initial commit Dec 14, 2013
Gruntfile.js Update JSHint configuration Mar 2, 2014
README.md Fix markdown Dec 15, 2013
package.json

README.md

grunt-selector4096

Warn if CSS file has more than equal 4096 selectors.

Getting Started

This plugin requires Grunt ~0.4.2

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-selector4096 --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-selector4096');

The "selector4096" task

Run this task with the grunt selector4096 command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Usage examples

In this example, running grunt selector4096:all (or grunt selector4096 because selector4096 is a multi task) will count selectors in all CSS files under the src/css/ directory and their subdirectories, warn if they have more than eqall 4096 selectors, and abort.

grunt.initConfig({
  selector4096: {
    all: ['src/css/**/*.css']
  }
});

This plugin is read-only task, so you don't need to specify dest like grunt-contrib-jshint.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 2013-12-14 v0.1.0 Initial release