Skip to content

Commit 6194351

Browse files
committed
5.0.0
1 parent f143771 commit 6194351

19 files changed

+595
-3755
lines changed

.editorconfig

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ root = true
44
charset = utf-8
55
end_of_line = lf
66
indent_style = tab
7-
tab_width = 2
87
insert_final_newline = true
98
trim_trailing_whitespace = true
109

11-
[*.{md,yml}]
12-
indent_style = space
13-
1410
[*.md]
1511
trim_trailing_whitespace = false
12+
13+
[*.{json,md,yml}]
14+
indent_size = 2
15+
indent_style = space

.gitattributes

-1
This file was deleted.

.gitignore

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
.nyc_output
2-
coverage
31
node_modules
2+
index.*.js
3+
package-lock.json
4+
*.log*
5+
*.result.css
6+
.*
7+
!.editorconfig
8+
!.gitignore
9+
!.rollup.js
10+
!.tape.js
11+
!.travis.yml

.rollup.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import babel from 'rollup-plugin-babel';
2+
3+
export default {
4+
input: 'index.js',
5+
output: [
6+
{ file: 'index.cjs.js', format: 'cjs' },
7+
{ file: 'index.es.js', format: 'es' }
8+
],
9+
plugins: [
10+
babel({
11+
presets: [
12+
['@babel/env', { modules: false, targets: { node: 6 } }]
13+
]
14+
})
15+
]
16+
};

.tape.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
'postcss-color-gray': {
3+
'basic': {
4+
message: 'supports basic usage'
5+
},
6+
'basic:preserve': {
7+
message: 'supports { preserve: true } usage',
8+
options: {
9+
preserve: true
10+
}
11+
}
12+
}
13+
};

.travis.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
branches:
2-
except: /^v\d/
1+
# https://docs.travis-ci.com/user/travis-lint
2+
33
language: node_js
4+
45
node_js:
5-
- '4'
6-
- node
7-
script: if [[ `node --version` != v4.* ]];
8-
then npm test;
9-
else node test.js;
10-
fi;
11-
after_script: if [[ `node --version` != v4.* ]];
12-
then node_modules/.bin/nyc report --reporter=text-lcov | npx coveralls;
13-
fi;
6+
- 6
7+
8+
install:
9+
- npm install --ignore-scripts

CHANGELOG.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
1-
# 4.1.0 - 2017-12-19
1+
# Changes to PostCSS Gray
2+
3+
### 5.0.0 (July 26, 2018)
4+
5+
- Rewritten to follow the latest [CSSWG specification](https://drafts.csswg.org/css-color/#grays)
6+
- Added: Compatibility with PostCSS v7.
7+
8+
# 4.1.0 - December 19, 2017
29

310
- Changed: relicense ([MIT](https://opensource.org/licenses/MIT)[ISC](https://opensource.org/licenses/ISC))
411
- Updated dependencies
512

6-
# 4.0.0 - 2017-05-15
13+
# 4.0.0 - May 15, 2017
714

8-
- Added: compatibility with postcss v6.x
15+
- Added: compatibility with PostCSS v6
916
- Updated dependencies
1017

11-
# 3.0.1 - 2016-11-28
18+
# 3.0.1 - November 28, 2016
1219

1320
- Bump `color` dependency version
1421
(@KenanY)
1522

16-
# 3.0.0 - 2015-09-08
23+
# 3.0.0 - September 8, 2015
1724

18-
- Added: compatibility with postcss v5.x
19-
- Removed: compatibility with postcss v4.x
25+
- Added: compatibility with PostCSS v5
26+
- Removed: compatibility with PostCSS v4
2027

21-
# 2.0.0 - 2015-01-26
28+
# 2.0.0 - January 26, 2015
2229

23-
- Added: compatibility with postcss v4.x
24-
- Removed: compatibility with postcss v3.x
30+
- Added: compatibility with PostCSS v4
31+
- Removed: compatibility with PostCSS v3
2532

26-
# 1.1.0 - 2014-11-25
33+
# 1.1.0 - November 25, 2014
2734

2835
- Changed: Enhanced exceptions
2936

30-
# 1.0.0 - 2014-11-01
37+
# 1.0.0 - November 1, 2014
3138

32-
Initial release
39+
- Initial release

CONTRIBUTING.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to PostCSS Gray
2+
3+
You want to help? You rock! Now, take a moment to be sure your contributions
4+
make sense to everyone else.
5+
6+
## Reporting Issues
7+
8+
Found a problem? Want a new feature?
9+
10+
- See if your issue or idea has [already been reported].
11+
- Provide a [reduced test case] or a [live example].
12+
13+
Remember, a bug is a _demonstrable problem_ caused by _our_ code.
14+
15+
## Submitting Pull Requests
16+
17+
Pull requests are the greatest contributions, so be sure they are focused in
18+
scope and avoid unrelated commits.
19+
20+
1. To begin; [fork this project], clone your fork, and add our upstream.
21+
```bash
22+
# Clone your fork of the repo into the current directory
23+
git clone [email protected]:YOUR_USER/postcss-color-gray.git
24+
25+
# Navigate to the newly cloned directory
26+
cd postcss-color-gray
27+
28+
# Assign the original repo to a remote called "upstream"
29+
git remote add upstream [email protected]:postcss/postcss-color-gray.git
30+
31+
# Install the tools necessary for testing
32+
npm install
33+
```
34+
35+
2. Create a branch for your feature or fix:
36+
```bash
37+
# Move into a new branch for your feature
38+
git checkout -b feature/thing
39+
```
40+
```bash
41+
# Move into a new branch for your fix
42+
git checkout -b fix/something
43+
```
44+
45+
3. If your code follows our practices, then push your feature branch:
46+
```bash
47+
# Test current code
48+
npm test
49+
```
50+
```bash
51+
# Push the branch for your new feature
52+
git push origin feature/thing
53+
```
54+
```bash
55+
# Or, push the branch for your update
56+
git push origin update/something
57+
```
58+
59+
That’s it! Now [open a pull request] with a clear title and description.
60+
61+
[already been reported]: issues
62+
[fork this project]: fork
63+
[live example]: https://codepen.io/pen
64+
[open a pull request]: https://help.github.com/articles/using-pull-requests/
65+
[reduced test case]: https://css-tricks.com/reduced-test-cases/

INSTALL.md

+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Installing PostCSS Gray
2+
3+
[PostCSS Gray] runs in all Node environments, with special instructions for:
4+
5+
| [Node](#node) | [Webpack](#webpack) | [Create React App](#create-react-app) | [Gulp](#gulp) | [Grunt](#grunt) |
6+
| --- | --- | --- | --- | --- |
7+
8+
## Node
9+
10+
Add [PostCSS Gray] to your project:
11+
12+
```bash
13+
npm install postcss-color-gray --save-dev
14+
```
15+
16+
Use [PostCSS Gray] to process your CSS:
17+
18+
```js
19+
import postcssGray from 'postcss-color-gray';
20+
21+
postcssGray.process(YOUR_CSS /*, processOptions, pluginOptions */);
22+
```
23+
24+
Or use it as a [PostCSS] plugin:
25+
26+
```js
27+
import postcss from 'postcss';
28+
import postcssGray from 'postcss-color-gray';
29+
30+
postcss([
31+
postcssGray(/* pluginOptions */)
32+
]).process(YOUR_CSS /*, processOptions */);
33+
```
34+
35+
## Webpack
36+
37+
Add [PostCSS Loader] to your project:
38+
39+
```bash
40+
npm install postcss-loader --save-dev
41+
```
42+
43+
Use [PostCSS Gray] in your Webpack configuration:
44+
45+
```js
46+
import postcssGray from 'postcss-color-gray';
47+
48+
module.exports = {
49+
module: {
50+
rules: [
51+
{
52+
test: /\.css$/,
53+
use: [
54+
'style-loader',
55+
{ loader: 'css-loader', options: { importLoaders: 1 } },
56+
{ loader: 'postcss-loader', options: {
57+
ident: 'postcss',
58+
plugins: () => [
59+
postcssGray(/* pluginOptions */)
60+
]
61+
} }
62+
]
63+
}
64+
]
65+
}
66+
}
67+
```
68+
69+
## Create React App
70+
71+
Add [React App Rewired] and [React App Rewire PostCSS] to your project:
72+
73+
```bash
74+
npm install react-app-rewired react-app-rewire-postcss --save-dev
75+
```
76+
77+
Use [React App Rewire PostCSS] and [PostCSS Gray] in your
78+
`config-overrides.js` file:
79+
80+
```js
81+
import reactAppRewirePostcss from 'react-app-rewire-postcss';
82+
import postcssGray from 'postcss-color-gray';
83+
84+
export default config => reactAppRewirePostcss(config, {
85+
plugins: () => [
86+
postcssGray(/* pluginOptions */)
87+
]
88+
});
89+
```
90+
91+
## Gulp
92+
93+
Add [Gulp PostCSS] to your project:
94+
95+
```bash
96+
npm install gulp-postcss --save-dev
97+
```
98+
99+
Use [PostCSS Gray] in your Gulpfile:
100+
101+
```js
102+
import postcss from 'gulp-postcss';
103+
import postcssGray from 'postcss-color-gray';
104+
105+
gulp.task('css', () => gulp.src('./src/*.css').pipe(
106+
postcss([
107+
postcssGray(/* pluginOptions */)
108+
])
109+
).pipe(
110+
gulp.dest('.')
111+
));
112+
```
113+
114+
## Grunt
115+
116+
Add [Grunt PostCSS] to your project:
117+
118+
```bash
119+
npm install grunt-postcss --save-dev
120+
```
121+
122+
Use [PostCSS Gray] in your Gruntfile:
123+
124+
```js
125+
import postcssGray from 'postcss-color-gray';
126+
127+
grunt.loadNpmTasks('grunt-postcss');
128+
129+
grunt.initConfig({
130+
postcss: {
131+
options: {
132+
use: [
133+
postcssGray(/* pluginOptions */)
134+
]
135+
},
136+
dist: {
137+
src: '*.css'
138+
}
139+
}
140+
});
141+
```
142+
143+
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
144+
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
145+
[PostCSS]: https://github.com/postcss/postcss
146+
[PostCSS Loader]: https://github.com/postcss/postcss-loader
147+
[PostCSS Gray]: https://github.com/postcss/postcss-color-gray
148+
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
149+
[React App Rewired]: https://github.com/timarney/react-app-rewired

LICENSE

-6
This file was deleted.

LICENSE.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ISC License (ISC)
2+
3+
## Copyright 2018 Shinnosuke Watanabe
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15+
PERFORMANCE OF THIS SOFTWARE.
16+
17+
For more information, please see
18+
https://opensource.org/licenses/ISC.

0 commit comments

Comments
 (0)