New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

karma-styluspreprocessor

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-styluspreprocessor

A Karma plugin. Compile stylus on the fly.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

karma-stylusPreprocessor

Configuration Options

  • paths: [Array] of paths to folders that should be used for file lookup when using @import.
  • save: [Boolean] Indicates whether result of compilation should be saved in project directory.
  • compress: [Boolean] Indicates whether css should be compressed or not.

Example configuration

module.exports = {
  frameworks: ['mocha', 'sinon-chai'],
  files: [
  	//..
  ],
  exclude:[
  	//..
  ],
  watch: [
  	//..
  ],
  preprocessors: {
    'app/assets/js/__tests__/**/*.styl': ['stylus']
  },
  //karma-stylusPreprocessor
  stylusPreprocessor: {
    options: {
      paths: ['app/assets/styles/_base/buttron'],
      save: true,
      compress: false
    },
    //Modify path
    transformPath: function(path) {
      path = path.replace(/\.styl$/, '.compiled.css');
      path = path.replace(/\/cases\//g, '/cases/compiled/');
      return path;
    }
  },
  webpack: webpackConfig,
  browserNoActivityTimeout: 100000,
  singleRun: true,
  reporters: ['nyan'],
  colors: true,
  browsers: ['PhantomJS_custom'],
    //custom flags
    customLaunchers: {
      'PhantomJS_custom': {
        base: 'PhantomJS',
        options: {
          windowName: 'my-window',
          settings: {
            webSecurityEnabled: false
          },
        },
        flags: ['--load-images=false'],
        debug: false
      }
    },
    // Have phantomjs exit if a ResourceError is encountered 
    // (useful ifkarma exits without killing phantom)
    phantomjsLauncher: {
      exitOnResourceError: true
    }
};

Keywords

karma-plugin

FAQs

Package last updated on 09 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts