Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fetchte/karma-styluspreprocessor
Karma plugin to compile stylus on the fly.
https://github.com/fetchte/karma-styluspreprocessor
Last synced: about 1 month ago
JSON representation
Karma plugin to compile stylus on the fly.
- Host: GitHub
- URL: https://github.com/fetchte/karma-styluspreprocessor
- Owner: fetchTe
- License: mit
- Created: 2015-05-22T20:54:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-02T01:21:43.000Z (about 8 years ago)
- Last Synced: 2024-11-06T23:22:38.262Z (about 2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
# 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```js
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
}
};
```