css-annotation-block
v0.1.0
Published
A css-annotation module to return the specific nodes
Downloads
1,094
Readme
css-annotation-block
A css-annotation module to return the specific nodes
Install
$ npm install css-annotation-block
Example
input.css
:
/* @start foo */
.class {
font-size: 12px;
}
/* @end foo */
var fs = require('fs')
var cssAnnotationBlock = require('css-annotation-block')
var css = fs.readFileSync('input.css', 'utf-8').trim()
cssAnnotationBlock(css)
/* Return: [ { name: 'foo', nodes: [ [Object] ] } ] */
name
is the name of its block.
nodes
is PostCSS's Node object.
License
The MIT License (MIT)
Copyright (c) 2015 Masaaki Morishita