- npm: Well... it's a Node.js package manager
- Grunt: Automates common tasks: test, build, clean
- Babel: Use next generation JavaScript, today.
- You need to have npm installed (it comes with node)
- Clone this repository:
git clone git@github.com:anolilab/stylus-unit.git
- Install dependencies:
npm install
npm i stylus-unit --save-dev
var unit = require('stylus-unit');
var config = {
describe: 'your describe',
testDirPath: 'path/to/your/tests',
stylus: {
import: 'path/to/your/stylus/file'
}
}
unit(config);
// Title used by Mocha top-level describe function
describe: ''
// The path where your styl tests are
testDirPath: ''
// Stylus config
stylus : {
}
// Mocha config
// Support for all Mocha [options](https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options)
mocha: {
}
// @describe Utils
// @describe amcss
// @it should output amcss for a given properties
am(module)
color: red;
am(module, blue)
color: blue;
am(module, large)
font-size: 2em;
// @expect
[ui-module] {
color: red;
}
[ui-module~="blue"] {
color: blue;
}
[ui-module~="large"] {
font-size: 2em;
}
$ make test
Utils
✓ should output amcss for a given properties (69ms)
Please see CHANGELOG for more information what has changed recently.
grunt test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.