0.1.0 • Published 8 years ago

css-annotation-block v0.1.0

Weekly downloads
312
License
MIT
Repository
github
Last release
8 years ago

css-annotation-block Build Status

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