Skip to content

About

Compiles slim to html for karma tests

Resources

Stars

5 stars

Watchers

11 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

karma-slim-preprocessor

Build Status

Preprocessor for converting slim files to html templates.

It requires the slimrb binary to be on your path, which will be present if slim is installed by bundler.

Installation

npm install karma-slim-preprocessor --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.slim': ['slim']
    },

    slimPreprocessor: {
      // If slimrb is not in your PATH, you can specify where it is:
      slimrb: "/usr/local/slimrb",
      
      // You can pass additional command line options to slimrb:
      slimrbOption: '-l { "foosball": true }' // or as array ['-l { "foosball": true }', '-r slim/smart']
    },

    files: [
      '**/*.js',
      '**/*.slim',
    ]
  });
};

About

Compiles slim to html for karma tests

Resources

Stars

5 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages