grunt-sass2scss
Convert Sass files to SCSS files with sass2scss
Getting Started
This plugin requires Grunt ~1.1.0
and Node.js
version to be minimum of 10.13.0
, which is the active Long Term Support (LTS) version,
and sass2scss
binary to be available either via PATH
or defined via configuration.
The sass2scss
tool can only be compiled from sources
at the moment, for example in Linux/Mac:
wget https://github.com/mgreter/sass2scss/archive/v1.1.2.tar.gztar zxf v1.1.2.tar.gzcd sass2scss-1.1.2/make[sudo] mv sass2scss /usr/local/bin/
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-sass2scss --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "sass2scss" task
Overview
In your project's Gruntfile, add a section named sass2scss
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.binPath
Type: String
Default value: 'sass2scss'
Path to the sass2scss
binary, which by default is assumed to be found from
the system PATH.
options.args
Type: Array
Default value: []
Command line options for the sass2scss
command line utility.
-p, --pretty pretty print output
-c, --convert convert src comments
-s, --strip strip all comments
-k, --keep keep all comments
-h, --help help text
-v, --version version information
For example to set pretty printing and to keep comments, use ['-p', '-k']
, or
['pretty', 'keep']
. The leading dashes are optional and added automatically when missing.
Usage Examples
Default Options
grunt;
Contributing
"A Beginner's Guide to Open Source: The Best Advice for Making your First Contribution".
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, via grunt test
command.
Also there is a blog post about "45 Github Issues Dos and Don’ts".
Linting is done with ESLint and can be executed with npm run lint
.
There should be no errors appearing after any JavaScript file changes.
Release History
v0.5.0
(2020-05-28)- Minimum Node.js version lifted from
8.1.11
to10.13.0
- Use Grunt.js minimum of
v1.1.0
- Minimum Node.js version lifted from
v0.4.0
(2018-12-16)- Minimum Node.js version lifted from
4.2.0
to8.1.11
- Use Grunt.js minimum of
v1.0.3
and latestsass2scss
which isv1.1.2
- Minimum Node.js version lifted from
v0.3.1
(2016-08-13)- Dependencies are sure 🎩 up to date
- Use ESLint directly without the Grunt.js plugin
v0.3.0
(2016-05-07)- It is Grunt.js
1.0.0
as the minimum supported - Start using shared ESLint configuration #3
- It is Grunt.js
v0.2.0
(2016-02-23)- Update dependencies
- Minimum Node.js version requirement is
4.2.0
(LTS)
v0.1.1
(2015-01-26)- A bit more docs
v0.1.0
(2015-01-15)- Doing what is promised, when
sass2scss
is available
- Doing what is promised, when
License
Copyright (c) Juga Paazmaya paazmaya@yahoo.com
Licensed under the MIT license.