postcss-nesting
Advanced tools
Comparing version 4.2.1 to 5.0.0
# Changes to PostCSS Nesting | ||
### 5.0.0 (March 24, 2018) | ||
- Refactored code to use Imports babel-transformed for Node v4 compatibility | ||
### 4.2.1 (September 19, 2017) | ||
@@ -4,0 +8,0 @@ |
132
LICENSE.md
@@ -33,75 +33,77 @@ # CC0 1.0 Universal | ||
to, the following: | ||
1. the right to reproduce, adapt, distribute, perform, display, | ||
communicate, and translate a Work; | ||
2. moral rights retained by the original author(s) and/or performer(s); | ||
3. publicity and privacy rights pertaining to a person’s image or likeness | ||
depicted in a Work; | ||
4. rights protecting against unfair competition in regards to a Work, | ||
subject to the limitations in paragraph 4(i), below; | ||
5. rights protecting the extraction, dissemination, use and reuse of data | ||
in a Work; | ||
6. database rights (such as those arising under Directive 96/9/EC of the | ||
European Parliament and of the Council of 11 March 1996 on the legal | ||
protection of databases, and under any national implementation thereof, | ||
including any amended or successor version of such directive); and | ||
7. other similar, equivalent or corresponding rights throughout the world | ||
based on applicable law or treaty, and any national implementations | ||
thereof. | ||
1. the right to reproduce, adapt, distribute, perform, display, communicate, | ||
and translate a Work; | ||
2. moral rights retained by the original author(s) and/or performer(s); | ||
3. publicity and privacy rights pertaining to a person’s image or likeness | ||
depicted in a Work; | ||
4. rights protecting against unfair competition in regards to a Work, | ||
subject to the limitations in paragraph 4(i), below; | ||
5. rights protecting the extraction, dissemination, use and reuse of data in | ||
a Work; | ||
6. database rights (such as those arising under Directive 96/9/EC of the | ||
European Parliament and of the Council of 11 March 1996 on the legal | ||
protection of databases, and under any national implementation thereof, | ||
including any amended or successor version of such directive); and | ||
7. other similar, equivalent or corresponding rights throughout the world | ||
based on applicable law or treaty, and any national implementations | ||
thereof. | ||
2. Waiver. To the greatest extent permitted by, but not in contravention of, | ||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and | ||
unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright | ||
and Related Rights and associated claims and causes of action, whether now | ||
known or unknown (including existing as well as future claims and causes of | ||
action), in the Work (i) in all territories worldwide, (ii) for the maximum | ||
duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes | ||
the Waiver for the benefit of each member of the public at large and to the | ||
detriment of Affirmer’s heirs and successors, fully intending that such Waiver | ||
shall not be subject to revocation, rescission, cancellation, termination, or | ||
any other legal or equitable action to disrupt the quiet enjoyment of the Work | ||
by the public as contemplated by Affirmer’s express Statement of Purpose. | ||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and | ||
unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright | ||
and Related Rights and associated claims and causes of action, whether now | ||
known or unknown (including existing as well as future claims and causes of | ||
action), in the Work (i) in all territories worldwide, (ii) for the maximum | ||
duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “Waiver”). Affirmer | ||
makes the Waiver for the benefit of each member of the public at large and | ||
to the detriment of Affirmer’s heirs and successors, fully intending that | ||
such Waiver shall not be subject to revocation, rescission, cancellation, | ||
termination, or any other legal or equitable action to disrupt the quiet | ||
enjoyment of the Work by the public as contemplated by Affirmer’s express | ||
Statement of Purpose. | ||
3. Public License Fallback. Should any part of the Waiver for any reason be | ||
judged legally invalid or ineffective under applicable law, then the Waiver | ||
shall be preserved to the maximum extent permitted taking into account | ||
Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver | ||
is so judged Affirmer hereby grants to each affected person a royalty-free, non | ||
transferable, non sublicensable, non exclusive, irrevocable and unconditional | ||
license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in | ||
all territories worldwide, (ii) for the maximum duration provided by applicable | ||
law or treaty (including future time extensions), (iii) in any current or | ||
future medium and for any number of copies, and (iv) for any purpose | ||
whatsoever, including without limitation commercial, advertising or promotional | ||
purposes (the “License”). The License shall be deemed effective as of the date | ||
CC0 was applied by Affirmer to the Work. Should any part of the License for any | ||
reason be judged legally invalid or ineffective under applicable law, such | ||
partial invalidity or ineffectiveness shall not invalidate the remainder of the | ||
License, and in such case Affirmer hereby affirms that he or she will not (i) | ||
exercise any of his or her remaining Copyright and Related Rights in the Work | ||
or (ii) assert any associated claims and causes of action with respect to the | ||
Work, in either case contrary to Affirmer’s express Statement of Purpose. | ||
judged legally invalid or ineffective under applicable law, then the Waiver | ||
shall be preserved to the maximum extent permitted taking into account | ||
Affirmer’s express Statement of Purpose. In addition, to the extent the | ||
Waiver is so judged Affirmer hereby grants to each affected person a | ||
royalty-free, non transferable, non sublicensable, non exclusive, | ||
irrevocable and unconditional license to exercise Affirmer’s Copyright and | ||
Related Rights in the Work (i) in all territories worldwide, (ii) for the | ||
maximum duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “License”). The License | ||
shall be deemed effective as of the date CC0 was applied by Affirmer to the | ||
Work. Should any part of the License for any reason be judged legally | ||
invalid or ineffective under applicable law, such partial invalidity or | ||
ineffectiveness shall not invalidate the remainder of the License, and in | ||
such case Affirmer hereby affirms that he or she will not (i) exercise any | ||
of his or her remaining Copyright and Related Rights in the Work or (ii) | ||
assert any associated claims and causes of action with respect to the Work, | ||
in either case contrary to Affirmer’s express Statement of Purpose. | ||
4. Limitations and Disclaimers. | ||
1. No trademark or patent rights held by Affirmer are waived, abandoned, | ||
surrendered, licensed or otherwise affected by this document. | ||
2. Affirmer offers the Work as-is and makes no representations or | ||
warranties of any kind concerning the Work, express, implied, statutory | ||
or otherwise, including without limitation warranties of title, | ||
merchantability, fitness for a particular purpose, non infringement, or | ||
the absence of latent or other defects, accuracy, or the present or | ||
absence of errors, whether or not discoverable, all to the greatest | ||
extent permissible under applicable law. | ||
3. Affirmer disclaims responsibility for clearing rights of other persons | ||
that may apply to the Work or any use thereof, including without | ||
limitation any person’s Copyright and Related Rights in the Work. | ||
Further, Affirmer disclaims responsibility for obtaining any necessary | ||
consents, permissions or other rights required for any use of the Work. | ||
4. Affirmer understands and acknowledges that Creative Commons is not a | ||
party to this document and has no duty or obligation with respect to | ||
this CC0 or use of the Work. | ||
1. No trademark or patent rights held by Affirmer are waived, abandoned, | ||
surrendered, licensed or otherwise affected by this document. | ||
2. Affirmer offers the Work as-is and makes no representations or warranties | ||
of any kind concerning the Work, express, implied, statutory or | ||
otherwise, including without limitation warranties of title, | ||
merchantability, fitness for a particular purpose, non infringement, or | ||
the absence of latent or other defects, accuracy, or the present or | ||
absence of errors, whether or not discoverable, all to the greatest | ||
extent permissible under applicable law. | ||
3. Affirmer disclaims responsibility for clearing rights of other persons | ||
that may apply to the Work or any use thereof, including without | ||
limitation any person’s Copyright and Related Rights in the Work. | ||
Further, Affirmer disclaims responsibility for obtaining any necessary | ||
consents, permissions or other rights required for any use of the Work. | ||
4. Affirmer understands and acknowledges that Creative Commons is not a | ||
party to this document and has no duty or obligation with respect to this | ||
CC0 or use of the Work. | ||
For more information, please see | ||
http://creativecommons.org/publicdomain/zero/1.0/. |
{ | ||
"name": "postcss-nesting", | ||
"version": "4.2.1", | ||
"description": "Nest style and media rules inside each another, following the CSS Nesting Module Level 3 specification", | ||
"version": "5.0.0", | ||
"description": "Nest style rules inside each other", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
@@ -10,12 +10,13 @@ "license": "CC0-1.0", | ||
"bugs": "https://github.com/jonathantneal/postcss-nesting/issues", | ||
"main": "index.js", | ||
"main": "index.cjs.js", | ||
"module": "index.es.js", | ||
"files": [ | ||
"index.js", | ||
"lib" | ||
"index.cjs.js", | ||
"index.es.js" | ||
], | ||
"scripts": { | ||
"clean": "git clean -X -d -f", | ||
"prepublish": "npm test", | ||
"prepublishOnly": "npm test", | ||
"pretest": "rollup -c .rollup.js --silent", | ||
"test": "echo 'Running tests...'; npm run test:js && npm run test:tape", | ||
"test:js": "eslint *.js --cache --ignore-pattern .gitignore", | ||
"test:js": "eslint *.js lib/*.js --cache --ignore-path .gitignore --quiet", | ||
"test:tape": "postcss-tape" | ||
@@ -27,12 +28,18 @@ }, | ||
"dependencies": { | ||
"postcss": "^6.0.11" | ||
"postcss": "^6.0.21" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^4.7.1", | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^8.2.3", | ||
"babel-preset-env": "^1.6.1", | ||
"eslint": "^4.19.1", | ||
"eslint-config-dev": "^2.0.0", | ||
"postcss-tape": "^2.1.0", | ||
"pre-commit": "^1.2.2" | ||
"postcss-tape": "^2.2.0", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^0.58.2", | ||
"rollup-plugin-babel": "^3.0.4" | ||
}, | ||
"eslintConfig": { | ||
"extends": "dev" | ||
"extends": "dev", | ||
"parser": "babel-eslint" | ||
}, | ||
@@ -39,0 +46,0 @@ "keywords": [ |
# PostCSS Nesting [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss] | ||
[![NPM Version][npm-img]][npm-url] | ||
[![CSS Standard Status][css-img]][css-url] | ||
[![NPM Version][npm-img]][npm-url] | ||
[![Build Status][cli-img]][cli-url] | ||
[![Licensing][lic-img]][lic-url] | ||
[![Gitter Chat][git-img]][git-url] | ||
[![Windows Build Status][win-img]][win-url] | ||
[![Support Chat][git-img]][git-url] | ||
@@ -12,3 +12,3 @@ [PostCSS Nesting] lets you nest style rules inside each other, following the | ||
```css | ||
```pcss | ||
a, b { | ||
@@ -22,3 +22,3 @@ color: red; | ||
/* after postcss-nesting */ | ||
/* becomes */ | ||
@@ -47,3 +47,5 @@ a, b { | ||
```js | ||
require('postcss-nesting').process(YOUR_CSS, { /* options */ }); | ||
import postcssNesting from 'postcss-nesting'; | ||
postcssNesting.process(YOUR_CSS); | ||
``` | ||
@@ -62,7 +64,44 @@ | ||
```js | ||
import postcss from 'gulp-postcss'; | ||
import postcssNesting from 'postcss-nesting'; | ||
postcss([ | ||
require('postcss-nesting')({ /* options */ }) | ||
]).process(YOUR_CSS, /* options */); | ||
postcssNesting(/* options */) | ||
]).process(YOUR_CSS); | ||
``` | ||
#### Webpack | ||
Add [PostCSS Loader] to your build tool: | ||
```bash | ||
npm install postcss-loader --save-dev | ||
``` | ||
Use [PostCSS Nesting] in your Webpack configuration: | ||
```js | ||
import postcssNesting from 'postcss-nesting'; | ||
export default { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
'style-loader', | ||
{ loader: 'css-loader', options: { importLoaders: 1 } }, | ||
{ loader: 'postcss-loader', options: { | ||
ident: 'postcss', | ||
plugins: () => [ | ||
postcssNesting(/* options */) | ||
] | ||
} } | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
#### Gulp | ||
@@ -79,13 +118,12 @@ | ||
```js | ||
var postcss = require('gulp-postcss'); | ||
import postcss from 'gulp-postcss'; | ||
import postcssNesting from 'postcss-nesting'; | ||
gulp.task('css', function () { | ||
return gulp.src('./src/*.css').pipe( | ||
postcss([ | ||
require('postcss-nesting')({ /* options */ }) | ||
]) | ||
).pipe( | ||
gulp.dest('.') | ||
); | ||
}); | ||
gulp.task('css', () => gulp.src('./src/*.css').pipe( | ||
postcss([ | ||
postcssNesting(/* options */) | ||
]) | ||
).pipe( | ||
gulp.dest('.') | ||
)); | ||
``` | ||
@@ -104,2 +142,4 @@ | ||
```js | ||
import postcssNesting from 'postcss-nesting'; | ||
grunt.loadNpmTasks('grunt-postcss'); | ||
@@ -111,3 +151,3 @@ | ||
use: [ | ||
require('postcss-nesting')({ /* options */ }) | ||
postcssNesting(/* options */) | ||
] | ||
@@ -124,10 +164,10 @@ }, | ||
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-nesting.svg | ||
[css-img]: https://jonathantneal.github.io/css-db/badge/css-nesting.svg | ||
[css-url]: https://jonathantneal.github.io/css-db/#css-nesting | ||
[css-img]: https://jonathantneal.github.io/cssdb/badge/nesting-rules.svg | ||
[css-url]: https://jonathantneal.github.io/cssdb/#nesting-rules | ||
[git-url]: https://gitter.im/postcss/postcss | ||
[git-img]: https://img.shields.io/badge/chat-gitter-blue.svg | ||
[lic-url]: LICENSE.md | ||
[lic-img]: https://img.shields.io/npm/l/postcss-nesting.svg | ||
[npm-url]: https://www.npmjs.com/package/postcss-nesting | ||
[npm-img]: https://img.shields.io/npm/v/postcss-nesting.svg | ||
[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/postcss-nesting.svg | ||
[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-nesting | ||
@@ -138,2 +178,3 @@ [CSS Nesting]: http://tabatkins.github.io/specs/css-nesting/ | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[PostCSS Loader]: https://github.com/postcss/postcss-loader | ||
[PostCSS Nesting]: https://github.com/jonathantneal/postcss-nesting |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
27985
351
172
9
6
1
Updatedpostcss@^6.0.21