asterisk

CSS docuemnt generator.

node-asterisk

CSS document generator.

At first, add comment to css file.

/*
<button class='btn btn-primary'>Primary Button</button>
 
```` ```html ````
<button class='btn btn-primary'>Primary Button</button>
```` ``` ````
*/
.btn {
  display: inline-block;
  width: 200px;
  border-radius: 5px;
  font-size: 24px;
  line-height: 1.5;
}
.btn.btn-primary {
  color: #fff;
  background-color: #3276b1;
  border-color: #285e8e;
}

You can use this from cli.

$ npm install -g asterisk
$ asterisk sample.css

From JavaScript code, require this simply.

var Asterisk = require('asterisk');
var asterisk = new Asterisk('sample.css');
asterisk.parse();

MIT.