postcss-nested
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -0,1 +1,4 @@ | ||
## 0.2.2 | ||
* Module returns function to have common PostCSS API. | ||
## 0.2.1 | ||
@@ -2,0 +5,0 @@ * Add comma support to selectors unwrap. |
@@ -65,2 +65,6 @@ var list = require('postcss/lib/list'); | ||
module.exports = { postcss: process }; | ||
module.exports = function () { | ||
return process; | ||
}; | ||
module.exports.postcss = process; |
{ | ||
"name": "postcss-nested", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "PostCSS plugin to unwrap nested rules like how Sass does it.", | ||
@@ -17,3 +17,3 @@ "keywords": ["postcss", "sass", "css", "nested"], | ||
"jshint-stylish": "1.0.0", | ||
"gulp-jshint": "1.9.1", | ||
"gulp-jshint": "1.9.2", | ||
"gulp-mocha": "2.0.0", | ||
@@ -20,0 +20,0 @@ "postcss": "4.0.3", |
@@ -5,4 +5,3 @@ # PostCSS Nested [![Build Status](https://travis-ci.org/postcss/postcss-nested.svg)](https://travis-ci.org/postcss/postcss-nested) | ||
[PostCSS](https://github.com/postcss/postcss) plugin to unwrap nested rules | ||
like how Sass does it. | ||
[PostCSS] plugin to unwrap nested rules like how Sass does it. | ||
@@ -16,6 +15,6 @@ ```css | ||
} | ||
body.is_dark & { | ||
color: white; | ||
} | ||
} | ||
body.is_dark &_title { | ||
color: white; | ||
} | ||
img { | ||
@@ -38,3 +37,3 @@ display: block; | ||
} | ||
body.is_dark phone_title { | ||
body.is_dark .phone_title { | ||
color: white; | ||
@@ -51,43 +50,10 @@ } | ||
[PostCSS]: https://github.com/postcss/postcss | ||
## Usage | ||
See [PostCSS](https://github.com/postcss/postcss) docs for source map options | ||
and other special cases. | ||
### Grunt | ||
```js | ||
grunt.initConfig({ | ||
postcss: { | ||
options: { | ||
processors: [ require('postcss-nested').postcss ] | ||
}, | ||
dist: { | ||
src: 'css/*.css' | ||
} | ||
} | ||
}); | ||
grunt.loadNpmTasks('grunt-postcss'); | ||
postcss([ require('postcss-nested') ]) | ||
``` | ||
### Gulp | ||
```js | ||
var postcss = require('gulp-postcss'); | ||
gulp.task('css', function () { | ||
return gulp.src('./src/*.css') | ||
.pipe(postcss([ require('postcss-nested') ])) | ||
.pipe(gulp.dest('./dest')); | ||
}); | ||
``` | ||
### Node | ||
```js | ||
var postcss = require('postcss'); | ||
var nested = require('postcss-nested'); | ||
var processed = postcss(nested).process(css).css; | ||
``` | ||
See [PostCSS] docs for examples for your environment. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63
5226
56