postcss-comment
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,5 @@ | ||
/** | ||
* Cloned from https://github.com/postcss/postcss/blob/master/lib/tokenize.es6 | ||
* | ||
*/ | ||
var SINGLE_QUOTE = 39; // `'' | ||
@@ -2,0 +6,0 @@ var DOUBLE_QUOTE = 34; // `"' |
{ | ||
"name": "postcss-comment", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Allow postcss to support inline comments", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
"test": "tap test/*.js", | ||
"coveralls": "COVERALLS_REPO_TOKEN=REPO_TOKEN npm test" | ||
}, | ||
@@ -28,6 +29,4 @@ "repository": { | ||
"devDependencies": { | ||
"del": "^2.0.2", | ||
"gulp": "^3.9.0", | ||
"tap": "^2.2.0" | ||
"tap": "^5.0.0" | ||
} | ||
} |
# postcss-comment | ||
Allow postcss to support inline comments. | ||
[![npm](https://nodei.co/npm/postcss-comment.png?downloads=true)](https://www.npmjs.org/package/postcss-comment) | ||
[![version](https://img.shields.io/npm/v/postcss-comment.svg)](https://www.npmjs.org/package/postcss-comment) | ||
@@ -11,2 +7,4 @@ [![status](https://travis-ci.org/zoubin/postcss-comment.svg?branch=master)](https://travis-ci.org/zoubin/postcss-comment) | ||
Allow postcss to support inline comments. | ||
## Usage | ||
@@ -41,3 +39,2 @@ | ||
### Hook require | ||
```javascript | ||
@@ -62,2 +59,22 @@ require('postcss-comment/hookRequire') | ||
Or: | ||
```javascript | ||
var postcss = require('postcss-comment/hookRequire') | ||
var fs = require('fs') | ||
var file = __dirname + '/inline.css' | ||
postcss() | ||
.process( | ||
fs.readFileSync(file, 'utf8'), | ||
{ from: file } | ||
) | ||
.then(function (result) { | ||
console.log(result.css) | ||
}) | ||
``` | ||
## Example | ||
@@ -64,0 +81,0 @@ |
14490
1
9
253
110