grunt-sass-revisited

1.1.2 • Public • Published

grunt-sass-revisited Build Status

NOTE: This is a fork of https://github.com/sindresorhus/grunt-sass, with the addition of an issue (with more detailed task configuration example) and a pull request (for output of total files processed at the end of the task) that were rejected by the current maintainer. https://github.com/sindresorhus/grunt-sass/pull/228 https://github.com/sindresorhus/grunt-sass/issues/227

This version is being used in project where more detailed output from the task (total number of stylesheets processed) is helpful. I'll monitor and maintain parity with the original repo.

Original README

(with updated install instructions, and additional task configuration example)

Compile Sass to CSS using node-sass

The issue tracker is disabled because of continuous abuse. Use Stack Overflow for support questions. Issues with the output should be reported on the libsass issue tracker. Install issues should be reported on the node-sass issue tracker. Learn how semver works before opening a PR updating node-sass.

This task uses libsass which is a Sass compiler in C++. In contrast to the original Ruby compiler, this one is much faster, but is missing some features, though improving quickly. It also doesn't support Compass. Check out grunt-contrib-sass if you prefer something more stable, but slower.

Install

$ npm install --save-dev grunt-sass-revisited

Usage

grunt.initConfig({
    sass: {
        options: {
            sourceMap: true
        },
        dist: {
            files: {
                'main.css': 'main.scss'
            }
        }
    }
});

Or...

grunt.initConfig({
    sass: {
        dev: {
            options: {
                outputStyle: 'expanded',
                sourceMap: true
            },
            files: [{
                expand: true,
                cwd: 'assets/scss',
                src: ['*.scss'],
                dest: 'public/css/',
                ext: '.css'
            }]
        },
        dist: {
            options: {
                outputStyle: 'compressed',
                sourceMap: false
            },
            files: [{
                expand: true,
                cwd: 'assets/scss',
                src: ['*.scss'],
                dest: 'public/css/',
                ext: '.css'
            }]
        }
    }
});
grunt.registerTask('default', ['sass']);

Files starting with _ are ignored to match the expected Sass partial behaviour.

Options

See the node-sass options, except for file, outFile, success, error.

The default value for the precision option is 10, so you don't have to change it when using Bootstrap.

License

MIT © Sindre Sorhus, portions © Anthony Bouch as well as other contributors.

Dependents (0)

Package Sidebar

Install

npm i grunt-sass-revisited

Weekly Downloads

1

Version

1.1.2

License

MIT

Last publish

Collaborators

  • 58bits