Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

anolilab/stylus-unit

Repository files navigation

stylus-unit

Author Software License

Releases

npm GitHub release

Dependencies

devDependency Status Dependency Status

1.0.0

Build Status

Master

Build Status

Bits and Pieces:

  • npm: Well... it's a Node.js package manager
  • Grunt: Automates common tasks: test, build, clean
  • Babel: Use next generation JavaScript, today.

Getting Started:

  1. You need to have npm installed (it comes with node)
  2. Clone this repository: git clone git@github.com:anolilab/stylus-unit.git
  3. Install dependencies: npm install

Install

npm i stylus-unit --save-dev

Usage

var unit = require('stylus-unit');
var config = {
  describe: 'your describe',
  testDirPath: 'path/to/your/tests',
  stylus: {
    import: 'path/to/your/stylus/file'
  }
}

unit(config);

Settings

// 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: {

}

Preview

// @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)

Plugins

Grunt

grunt-stylus-unit

Gulp

gulp-stylus-unit

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

grunt test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.