css-annotation
Annotation parser for CSS
Installation
$ npm install css-annotation
Example
input.css
:
/* * @foo foofoo * @bar bar bar bar */ { /* * @hoge */}
var fs = var annotation = var css = fs annotation/*[ { foo: 'foofoo', bar: 'bar bar bar' }, { atrule: 'media', hoge: true, params: 'screen (min-width: 600px)' }, { baz: ['baz1', 'baz2', 'baz3'] rule: '.class' }]*/
API
annotation.parse(css)
Parse annotation comment in css
and return array of its results.
annotation.read(commentText)
commentText
is PostCSS's comment.text
.
Return its parse results.
License
The MIT License (MIT)
Copyright (c) 2014 Masaaki Morishita