postcss-place
Advanced tools
Comparing version 5.0.0 to 7.0.0
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var postcss = _interopDefault(require('postcss')); | ||
var postcssValuesParser = require('postcss-values-parser'); | ||
@@ -37,11 +34,18 @@ | ||
var index = postcss.plugin('postcss-place', opts => { | ||
const creator = opts => { | ||
// prepare options | ||
if ('preserve' in Object(opts)) options.preserve = Boolean(opts.preserve); | ||
return root => { | ||
// walk each matching declaration | ||
root.walkDecls(placeMatch, onCSSDeclaration); | ||
return { | ||
postcssPlugin: 'postcss-place', | ||
Declaration: decl => { | ||
if (placeMatch.test(decl)) { | ||
onCSSDeclaration(decl); | ||
} | ||
} | ||
}; | ||
}); | ||
}; | ||
module.exports = index; | ||
creator.postcss = true; | ||
module.exports = creator; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "postcss-place", | ||
"version": "5.0.0", | ||
"version": "7.0.0", | ||
"description": "Use a place-* shorthand for align-* and justify-* in CSS", | ||
@@ -26,17 +26,19 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"engines": { | ||
"node": ">=10.0.0" | ||
"node": ">=12" | ||
}, | ||
"dependencies": { | ||
"postcss": "^7.0.27", | ||
"postcss-values-parser": "^3.2.1" | ||
"postcss-values-parser": "6.0.0" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^6.8.0", | ||
"postcss-tape": "^5.0.2", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^2.7.2", | ||
"rollup-plugin-babel": "^4.4.0" | ||
"@babel/core": "7.15.5", | ||
"@babel/preset-env": "7.15.6", | ||
"@rollup/plugin-babel": "5.3.0", | ||
"eslint": "7.32.0", | ||
"postcss": "8.3.6", | ||
"postcss-tape": "6.0.1", | ||
"pre-commit": "1.2.2", | ||
"rollup": "2.56.3" | ||
}, | ||
@@ -59,20 +61,6 @@ "babel": { | ||
"extends": "eslint:recommended", | ||
"parser": "babel-eslint" | ||
"parserOptions": { | ||
"sourceType": "module" | ||
} | ||
}, | ||
"rollup": { | ||
"input": "src/index.js", | ||
"plugins": [ | ||
"rollup-plugin-babel" | ||
], | ||
"output": [ | ||
{ | ||
"file": "dist/index.js", | ||
"format": "cjs" | ||
}, | ||
{ | ||
"file": "dist/index.mjs", | ||
"format": "esm" | ||
} | ||
] | ||
}, | ||
"keywords": [ | ||
@@ -79,0 +67,0 @@ "postcss", |
@@ -5,3 +5,3 @@ # PostCSS Place Properties [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss] | ||
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/double-position-gradients.svg" height="20">][css-url] | ||
[<img alt="Build Status" src="https://img.shields.io/travis/csstools/postcss-place/master.svg" height="20">][cli-url] | ||
[<img alt="Build Status" src="https://github.com/csstools/postcss-place/workflows/test/badge.svg" height="20">][cli-url] | ||
[<img alt="Support Chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url] | ||
@@ -35,16 +35,8 @@ | ||
```bash | ||
npm install postcss-place --save-dev | ||
npm install postcss postcss-place --save-dev | ||
``` | ||
Use [PostCSS Place Properties] to process your CSS: | ||
Use it as a [PostCSS] plugin: | ||
```js | ||
import postcssPlace from 'postcss-place'; | ||
postcssPlace.process(YOUR_CSS /*, processOptions, pluginOptions */); | ||
``` | ||
Or use it as a [PostCSS] plugin: | ||
```js | ||
import postcss from 'postcss'; | ||
@@ -90,3 +82,3 @@ import postcssPlace from 'postcss-place'; | ||
[cli-url]: https://travis-ci.org/csstools/postcss-place | ||
[cli-url]: https://github.com/csstools/postcss-place/actions/workflows/test.yml?query=workflow/test | ||
[css-url]: https://cssdb.org/#place-properties | ||
@@ -93,0 +85,0 @@ [git-url]: https://gitter.im/postcss/postcss |
Sorry, the diff of this file is not supported yet
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
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
19619
7
83
0
91
+ Addedis-url-superb@4.0.0(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.47(transitive)
+ Addedpostcss-values-parser@6.0.0(transitive)
+ Addedquote-unquote@1.0.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
- Removedpostcss@^7.0.27
- Removedip-regex@4.3.0(transitive)
- Removedis-url-superb@3.0.0(transitive)
- Removedpicocolors@0.2.1(transitive)
- Removedpostcss@7.0.39(transitive)
- Removedpostcss-values-parser@3.2.1(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedtlds@1.255.0(transitive)
- Removedurl-regex@5.0.0(transitive)
Updatedpostcss-values-parser@6.0.0