postcss-strip-inline-comments
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "postcss-strip-inline-comments", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Strip inline comments using the postcss-scss parser", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ # PostCSS strip inline comments [![Build Status](https://travis-ci.org/mummybot/postcss-strip-inline-comments.svg?branch=master)](https://travis-ci.org/mummybot/postcss-strip-inline-comments) | ||
```css | ||
```scss | ||
/* This comment will remain */ | ||
@@ -24,2 +24,4 @@ // This comment will be removed | ||
###Install | ||
```npm install postcss-strip-inline-comments --save-dev``` | ||
@@ -85,1 +87,15 @@ | ||
``` | ||
###Node | ||
```javascript | ||
import postcss from 'postcss'; | ||
import syntax from 'postcss-scss'; | ||
import stripInlineComments from 'strip-inline-comments'; | ||
let css = fs.readFileSync('style.css', 'utf8'); | ||
postcss([stripInlineComments]).process(css, { parser: syntax }).then( result => { | ||
console.log(result.css); | ||
}); | ||
``` |
5029
99