karma-sass-preprocessor

0.0.1 • Public • Published

karma-sass-preprocessor

Preprocessor to watch sass files changes and build css on the fly.

Installation

The easiest way is to keep karma-sass-preprocessor as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-sass-preprocessor": "~0.0.1"
  }
}

You can simple do it by:

npm install karma-sass-preprocessor --save-dev

Configuration

Following code shows the example configuration...

// karma.conf.js
module.exports = function(config) {
  config.set({
    files: [
      {
        pattern: 'scss/**/*.scss',
        watched: true,
        included: false,
        served: true
      },
      'test/unit-sass.css'
    ],
    preprocessors: {
      'scss/**/*.scss': ['sass']
    },
    sassPreprocessor: {
      source: 'scss/*.scss',
      createSourceMaps: true,
      outputDir:  __dirname + '/test/',
      outputFile: 'unit-sass.css'
    }    
  });
};

For more information on Karma see the homepage.

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i karma-sass-preprocessor

    Weekly Downloads

    3

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • navigator117