postcss-color-rebeccapurple
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -1,11 +0,17 @@ | ||
# 5.0.0 - 2020-01-29 | ||
# Changes to PostCSS RebeccaPurple | ||
### 6.0.0 (April 25, 2020) | ||
- Updated: `postcss-values-parser` to 3.2.0 (major) | ||
## 5.0.0 (January 29, 2020) | ||
- Updated: Support for Node v10+ | ||
- Updated: PostCSS Values Parser v3+ | ||
# 4.0.1 - 2018-09-18 | ||
## 4.0.1 (September 18, 2018) | ||
- Updated: PostCSS Values Parser v2+ | ||
# 4.0.0 - 2018-09-17 | ||
## 4.0.0 (September 17, 2018) | ||
@@ -15,3 +21,3 @@ - Updated: Support for PostCSS v7+ | ||
# 3.1.0 - 2018-05-01 | ||
## 3.1.0 (May 1, 2018) | ||
@@ -22,7 +28,7 @@ - Improve `rebeccapurple` pre-parse word detection | ||
# 3.0.0 - 2017-05-10 | ||
## 3.0.0 (May 1, 2017) | ||
- Added: compatibility with postcss v6.x | ||
# 2.0.1 - 2016-11-28 | ||
## 2.0.1 (November 28, 2016) | ||
@@ -32,3 +38,3 @@ - Bump `color` dependency version | ||
# 2.0.0 - 2015-09-08 | ||
## 2.0.0 (September 8, 2015) | ||
@@ -38,3 +44,3 @@ - Added: compatibility with postcss v5.x | ||
# 1.2.0 - 2015-08-13 | ||
## 1.2.0 (August 13, 2015) | ||
@@ -44,8 +50,8 @@ - Added: compatibility with postcss v4.1.x | ||
# 1.1.0 - 2014-11-25 | ||
## 1.1.0 (November 25, 2014) | ||
- Enhanced exceptions | ||
# 1.0.0 - 2014-10-04 | ||
## 1.0.0 (November 4, 2014) | ||
Initial release from [postcss-color](https://github.com/postcss/postcss-color) |
107
package.json
{ | ||
"name": "postcss-color-rebeccapurple", | ||
"version": "5.0.0", | ||
"description": "PostCSS plugin to transform W3C CSS rebeccapurple color to more compatible CSS (rgb())", | ||
"keywords": [ | ||
"css", | ||
"postcss", | ||
"postcss-plugin", | ||
"color", | ||
"colour", | ||
"rgb", | ||
"rebeccapurple" | ||
"version": "6.0.0", | ||
"description": "Use the rebeccapurple color keyword in CSS", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"contributors": [ | ||
"Maxime Thirouin" | ||
], | ||
"author": "Maxime Thirouin", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-color-rebeccapurple.git" | ||
}, | ||
"license": "CC0-1.0", | ||
"repository": "postcss/postcss-color-rebeccapurple", | ||
"homepage": "https://github.com/postcss/postcss-color-rebeccapurple#readme", | ||
"bugs": "https://github.com/postcss/postcss-color-rebeccapurple/issues", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.mjs", | ||
"files": [ | ||
"index.js" | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "npx rollup -c .rollup.js", | ||
"build:watch": "npx rollup -c .rollup.js --watch", | ||
"lint": "npx eslint --cache src", | ||
"lint:fix": "npx eslint --cache --fix", | ||
"pretest": "npm install && npm run build", | ||
"test": "npm run lint && npm run tape", | ||
"tape": "npx postcss-tape", | ||
"prepublishOnly": "npm test" | ||
}, | ||
"engines": { | ||
@@ -27,15 +32,65 @@ "node": ">=10.0.0" | ||
"dependencies": { | ||
"postcss": "^7.0.26", | ||
"postcss-values-parser": "^3.0.5" | ||
"postcss": "^7.0.27", | ||
"postcss-values-parser": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^6.8.0", | ||
"npmpub": "^5.0.0", | ||
"tape": "^4.9.1" | ||
"postcss-tape": "^5.0.2", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^2.7.2", | ||
"rollup-plugin-babel": "^4.4.0" | ||
}, | ||
"scripts": { | ||
"lint": "eslint index.js ./test/*.js", | ||
"test": "npm run lint && tape test", | ||
"release": "npmpub" | ||
} | ||
"babel": { | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"targets": "maintained node versions" | ||
} | ||
] | ||
] | ||
}, | ||
"eslintConfig": { | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parser": "babel-eslint" | ||
}, | ||
"rollup": { | ||
"input": "src/index.js", | ||
"plugins": [ | ||
"rollup-plugin-babel" | ||
], | ||
"output": [ | ||
{ | ||
"file": "dist/index.cjs.js", | ||
"format": "cjs" | ||
}, | ||
{ | ||
"file": "dist/index.esm.js", | ||
"format": "esm" | ||
} | ||
] | ||
}, | ||
"keywords": [ | ||
"postcss", | ||
"css", | ||
"postcss-plugin", | ||
"becca", | ||
"color", | ||
"colors", | ||
"csswg", | ||
"eric", | ||
"meyer", | ||
"purple", | ||
"rebecca", | ||
"rgb", | ||
"syntax", | ||
"w3c" | ||
] | ||
} |
107
README.md
@@ -1,70 +0,91 @@ | ||
# postcss-color-rebeccapurple [![CSS Standard Status](https://cssdb.org/badge/rebeccapurple-color.svg)](https://cssdb.org/#rebeccapurple-color) [![Build Status](https://api.travis-ci.org/postcss/postcss-color-rebeccapurple.svg)](https://travis-ci.org/postcss/postcss-color-rebeccapurple) | ||
# PostCSS RebeccaPurple [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss] | ||
> [PostCSS](https://github.com/postcss/postcss) plugin to transform [W3C CSS `rebeccapurple` color](https://www.w3.org/TR/css-color-4/#valdef-color-rebeccapurple) to more compatible CSS (rgb()). | ||
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-lab-function.svg" height="20">][npm-url] | ||
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/rebeccapurple-color.svg" height="20">][css-url] | ||
[<img alt="Build Status" src="https://img.shields.io/travis/csstools/postcss-lab-function/master.svg" height="20">][cli-url] | ||
[<img alt="Support Chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url] | ||
[PostCSS RebeccaPurple] lets you use the `rebeccapurple` color keyword in CSS. | ||
```pcss | ||
.heading { | ||
color: rebeccapurple; | ||
} | ||
/* becomes */ | ||
.heading { | ||
color: #639; | ||
} | ||
``` | ||
[!['Can I use' table](https://caniuse.bitsofco.de/image/css-rebeccapurple.png)](https://caniuse.com/#feat=css-rebeccapurple) | ||
## Why this plugin ? | ||
## About the `rebeccapurple` keyword | ||
If you did some CSS, I'm sure you know who [Eric Meyer](https://en.wikipedia.org/wiki/Eric_A._Meyer) is, & what he did for this language. | ||
In memory of [Eric Meyer’s daughter](https://meyerweb.com/eric/thoughts/2014/06/09/in-memoriam-2/), [W3C added new color rebeccapurple to CSS 4 Color Module](https://lists.w3.org/Archives/Public/www-style/2014Jun/0312.html). | ||
In 2014, Rebecca Alison Meyer, the daughter of [Eric A. Meyer](https://en.wikipedia.org/wiki/Eric_A._Meyer), an American web design consultant best known for his advocacy work on behalf of CSS, passed away of a brain tumor at six years of age. | ||
## Installation | ||
In her memory, the hex color `#663399` is named `rebeccapurple` and [added to the CSS Colors list](https://lists.w3.org/Archives/Public/www-style/2014Jun/0312.html). | ||
```console | ||
$ npm install postcss-color-rebeccapurple | ||
## Usage | ||
Add [PostCSS RebeccaPurple] to your project: | ||
```bash | ||
npm install postcss-color-rebeccapurple --save-dev | ||
``` | ||
## Usage | ||
Use **PostCSS RebeccaPurple** to process your CSS: | ||
```js | ||
// dependencies | ||
var fs = require("fs") | ||
var postcss = require("postcss") | ||
var colorRebeccapurple = require("postcss-color-rebeccapurple") | ||
const postcssRebeccaPurple = require('postcss-color-rebeccapurple'); | ||
// css to be processed | ||
var css = fs.readFileSync("input.css", "utf8") | ||
// process css | ||
var output = postcss() | ||
.use(colorRebeccapurple()) | ||
.process(css) | ||
.css | ||
postcssRebeccaPurple.process(YOUR_CSS /*, processOptions, pluginOptions */); | ||
``` | ||
Using this `input.css`: | ||
Or use it as a [PostCSS] plugin: | ||
```css | ||
body { | ||
color: rebeccapurple | ||
} | ||
```js | ||
const postcss = require('postcss'); | ||
const postcssRebeccaPurple = require('postcss-color-rebeccapurple'); | ||
postcss([ | ||
postcssRebeccaPurple(/* pluginOptions */) | ||
]).process(YOUR_CSS /*, processOptions */); | ||
``` | ||
you will get: | ||
**PostCSS RebeccaPurple** runs in all Node environments, with special instructions for: | ||
```css | ||
body { | ||
color: rgb(102, 51, 153); | ||
} | ||
``` | ||
| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) | | ||
| --- | --- | --- | --- | --- | --- | | ||
Checkout [tests](test) for more examples. | ||
--- | ||
### preserve | ||
## Contributing | ||
The `preserve` option determines whether the original `rebeccapurple` keyword | ||
is preserved. By default, it is not preserved. | ||
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature. | ||
```js | ||
postcssRebeccaPurple({ preserve: true }) | ||
``` | ||
```console | ||
$ git clone https://github.com/postcss/postcss-color-rebeccapurple.git | ||
$ git checkout -b patch-1 | ||
$ npm install | ||
$ npm test | ||
```pcss | ||
.heading { | ||
color: rebeccapurple; | ||
} | ||
/* becomes */ | ||
.heading { | ||
color: #639; | ||
color: rebeccapurple; | ||
} | ||
``` | ||
## [Changelog](CHANGELOG.md) | ||
[cli-url]: https://travis-ci.org/postcss/postcss-color-rebeccapurple | ||
[css-url]: https://cssdb.org/#rebeccapurple-color | ||
[git-url]: https://gitter.im/postcss/postcss | ||
[npm-url]: https://www.npmjs.com/package/postcss-color-rebeccapurple | ||
## [License](LICENSE) | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[PostCSS RebeccaPurple]: https://github.com/postcss/postcss-color-rebeccapurple |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
17137
6
92
0
92
8
1
Updatedpostcss@^7.0.27
Updatedpostcss-values-parser@^3.2.0