grunt-sass-version
Confirm that a particular version of Sass is available to Grunt.
Getting Started
This plugin requires Grunt >=0.4.5
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-sass-version --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "sass_version" task
Overview
In your project's Gruntfile, add a section named sass_version
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.ignorePatch
Type: Boolean
Default value: false
Set to true
if you wish to ignore differences in the patch version.
options.ignoreMinor
Type: Boolean
Default value: false
Set to true
if you wish to ignore differences in the patch version.
Usage Examples
Default Options
In this example, the default options are used to test the available version of Sass
against a desired version as specified in the version
property. The build will fail
unless the Sass version as reported by sass -v
matches exactly.
grunt;
Custom Options
In this example, custom options are used to test only a portion of the Sass version. If
ignorePatch
is set to true, then only the major and minor parts of the version number
are required to match.
grunt;
If the ignoreMinor
option is set to true, then only the major part of the version
number is required to match. The ignoreMinor
option implies the ignorePatch
option
so you don't need to set both.
grunt;
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
- 2014-12-02 v0.1.0 First official release.