Skip to content

Commit a68c2d5

Browse files
committed
5.0.0
1 parent 57c416c commit a68c2d5

15 files changed

+346
-1057
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
node_modules
2+
index.*.js
3+
package-lock.json
4+
*.log*
5+
*.result.css
26
.*
3-
!.appveyor.yml
47
!.editorconfig
58
!.gitignore
9+
!.rollup.js
610
!.tape.js
711
!.travis.yml
8-
*.log*
9-
*.result.css
10-
/index.css
11-
/lib/normalize.json

.rollup.js

Lines changed: 16 additions & 0 deletions
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+
['env', { modules: false, targets: { node: 6 } }]
13+
]
14+
})
15+
]
16+
};

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
language: node_js
44

55
node_js:
6-
- 4
6+
- 6
77

88
install:
99
- npm install --ignore-scripts

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes to PostCSS Normalize
22

3+
### 5.0.0 (June 7, 2018)
4+
5+
- Update `browserslist` to v3.2.8 (major)
6+
- Update: `postcss` to v6.0.22 (patch)
7+
- Update: Node support from v4 to v6 (major)
8+
39
### 4.0.0 (June 21, 2017)
410

511
- Require insertion point. Make old behavior an option.

CONTRIBUTING.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,52 @@ Remember, a bug is a _demonstrable problem_ caused by _our_ code.
1414

1515
## Submitting Pull Requests
1616

17-
Pull requests are the greatest contributions, so be sure they are focused in
18-
scope, and do avoid unrelated commits.
17+
Pull requests are the greatest contributions, so be sure they are focused in
18+
scope and avoid unrelated commits.
1919

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 https://github.com/<your-user>/postcss-normalize
24-
# Navigate to the newly cloned directory
25-
cd postcss-normalize
26-
# Assign the original repo to a remote called "upstream"
27-
git remote add upstream https://github.com/jonathantneal/postcss-normalize
28-
# Install the tools necessary for development
29-
npm install
30-
```
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 git@github.com:YOUR_USER/postcss-normalize.git
3124

32-
2. Create a branch for your feature or fix:
33-
```bash
34-
# Move into a new branch for a feature
35-
git checkout -b feature/thing
36-
```
37-
```bash
38-
# Move into a new branch for a fix
39-
git checkout -b fix/something
40-
```
25+
# Navigate to the newly cloned directory
26+
cd postcss-normalize
27+
28+
# Assign the original repo to a remote called "upstream"
29+
git remote add upstream git@github.com:jonathantneal/postcss-normalize.git
4130

42-
3. Be sure your code follows our practices.
43-
```bash
44-
# Test current code
45-
npm run test
46-
```
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+
```
4744

48-
4. Push your branch up to your fork:
49-
```bash
50-
# Push a feature branch
51-
git push origin feature/thing
52-
```
53-
```bash
54-
# Push a fix branch
55-
git push origin fix/something
56-
```
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+
```
5758

58-
5. Now [open a pull request] with a clear title and description.
59+
That’s it! Now [open a pull request] with a clear title and description.
5960

6061
[already been reported]: issues
6162
[fork this project]: fork
62-
[live example]: http://codepen.io/pen
63+
[live example]: https://codepen.io/pen
6364
[open a pull request]: https://help.github.com/articles/using-pull-requests/
6465
[reduced test case]: https://css-tricks.com/reduced-test-cases/

INSTALL.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Installing PostCSS Normalize
2+
3+
$[PostCSS Normalize] 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 Normalize] to your project:
11+
12+
```bash
13+
npm install postcss-normalize --save-dev
14+
```
15+
16+
Use [PostCSS Normalize] to process your CSS:
17+
18+
```js
19+
import postcssNormalize from 'postcss-normalize';
20+
21+
postcssNormalize.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 postcssNormalize from 'postcss-normalize';
29+
30+
postcss([
31+
postcssNormalize(/* 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 Normalize] in your Webpack configuration:
44+
45+
```js
46+
import postcssNormalize from 'postcss-normalize';
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+
postcssNormalize(/* 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 Normalize] in your
78+
`config-overrides.js` file:
79+
80+
```js
81+
import reactAppRewirePostcss from 'react-app-rewire-postcss';
82+
import postcssNormalize from 'postcss-normalize';
83+
84+
export default config => reactAppRewirePostcss(config, {
85+
plugins: () => [
86+
postcssNormalize(/* 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 Normalize] in your Gulpfile:
100+
101+
```js
102+
import postcss from 'gulp-postcss';
103+
import postcssNormalize from 'postcss-normalize';
104+
105+
gulp.task('css', () => gulp.src('./src/*.css').pipe(
106+
postcss([
107+
postcssNormalize(/* 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 Normalize] in your Gruntfile:
123+
124+
```js
125+
import postcssNormalize from 'postcss-normalize';
126+
127+
grunt.loadNpmTasks('grunt-postcss');
128+
129+
grunt.initConfig({
130+
postcss: {
131+
options: {
132+
use: [
133+
postcssNormalize(/* 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 Normalize]: https://github.com/jonathantneal/postcss-normalize
148+
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
149+
[React App Rewired]: https://github.com/timarney/react-app-rewired

0 commit comments

Comments
 (0)