Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 581ba23

Browse files
committed
2.0.0
1 parent add0598 commit 581ba23

File tree

8 files changed

+208
-141
lines changed

8 files changed

+208
-141
lines changed

.appveyor.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
node_modules
2-
index.*.js
2+
index.*.*
33
package-lock.json
44
*.log*
55
*.result.css
66
.*
7-
!.appveyor.yml
87
!.editorconfig
98
!.gitignore
109
!.rollup.js

.rollup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import babel from 'rollup-plugin-babel';
33
export default {
44
input: 'index.js',
55
output: [
6-
{ file: 'index.cjs.js', format: 'cjs' },
7-
{ file: 'index.es.js', format: 'es' }
6+
{ file: 'index.cjs.js', format: 'cjs', sourcemap: true },
7+
{ file: 'index.es.mjs', format: 'es', sourcemap: true }
88
],
99
plugins: [
1010
babel({
1111
presets: [
12-
['env', { modules: false, targets: { node: 4 } }]
12+
['@babel/env', { modules: false, targets: { node: 6 } }]
1313
]
1414
})
1515
]

.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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes to PostCSS Logical Properties
22

3+
### 2.0.0 (September 17, 2018)
4+
5+
- Updated: Support for PostCSS v7+
6+
- Updated: Support for Node v6+
7+
38
### 1.1.1 (March 21, 2017)
49

510
- Fix `dir` option to allow falsey value

INSTALL.md

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

0 commit comments

Comments
 (0)