Skip to content

Commit 70db2c0

Browse files
jonathantnealromainmenke
authored andcommitted
1.0.0
1 parent f01f336 commit 70db2c0

15 files changed

+660
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = tab
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+
13+
[*.{json,md,yml}]
14+
indent_size = 2
15+
indent_style = space
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
index.*.*
3+
package-lock.json
4+
*.log*
5+
*.result.css
6+
.*
7+
!.editorconfig
8+
!.gitignore
9+
!.rollup.js
10+
!.tape.js
11+
!.travis.yml
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', sourcemap: true },
7+
{ file: 'index.es.mjs', format: 'es', sourcemap: true }
8+
],
9+
plugins: [
10+
babel({
11+
presets: [
12+
['@babel/env', { modules: false, targets: { node: 6 } }]
13+
]
14+
})
15+
]
16+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
'postcss-double-position-gradients': {
3+
'basic': {
4+
message: 'supports basic usage'
5+
},
6+
'basic:preserve': {
7+
message: 'supports { preserve: false } usage',
8+
options: { preserve: false }
9+
}
10+
}
11+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# https://docs.travis-ci.com/user/travis-lint
2+
3+
language: node_js
4+
5+
node_js:
6+
- 6
7+
8+
install:
9+
- npm install --ignore-scripts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changes to PostCSS Double Position Gradients
2+
3+
### 1.0.0 (October 28, 2018)
4+
5+
- Initial version
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to PostCSS Double Position Gradients
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 git@github.com:YOUR_USER/postcss-double-position-gradients.git
24+
25+
# Navigate to the newly cloned directory
26+
cd postcss-double-position-gradients
27+
28+
# Assign the original repo to a remote called "upstream"
29+
git remote add upstream git@github.com:jonathantneal/postcss-double-position-gradients.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/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Installing PostCSS Double Position Gradients
2+
3+
[PostCSS Double Position Gradients] runs in all Node environments, with special instructions for:
4+
5+
| [Node](#node) | [PostCSS CLI](#postcss-cli) | [Webpack](#webpack) | [Create React App](#create-react-app) | [Gulp](#gulp) | [Grunt](#grunt) |
6+
| --- | --- | --- | --- | --- | --- |
7+
8+
## Node
9+
10+
Add [PostCSS Double Position Gradients] to your project:
11+
12+
```bash
13+
npm install postcss-double-position-gradients --save-dev
14+
```
15+
16+
Use [PostCSS Double Position Gradients] to process your CSS:
17+
18+
```js
19+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
20+
21+
postcssDoublePositionGradients.process(YOUR_CSS /*, processOptions, pluginOptions */);
22+
```
23+
24+
Or use it as a [PostCSS] plugin:
25+
26+
```js
27+
const postcss = require('postcss');
28+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
29+
30+
postcss([
31+
postcssDoublePositionGradients(/* pluginOptions */)
32+
]).process(YOUR_CSS /*, processOptions */);
33+
```
34+
35+
## PostCSS CLI
36+
37+
Add [PostCSS CLI] to your project:
38+
39+
```bash
40+
npm install postcss-cli --save-dev
41+
```
42+
43+
Use [PostCSS Double Position Gradients] in your `postcss.config.js` configuration file:
44+
45+
```js
46+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
47+
48+
module.exports = {
49+
plugins: [
50+
postcssDoublePositionGradients(/* pluginOptions */)
51+
]
52+
}
53+
```
54+
55+
## Webpack
56+
57+
Add [PostCSS Loader] to your project:
58+
59+
```bash
60+
npm install postcss-loader --save-dev
61+
```
62+
63+
Use [PostCSS Double Position Gradients] in your Webpack configuration:
64+
65+
```js
66+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
67+
68+
module.exports = {
69+
module: {
70+
rules: [
71+
{
72+
test: /\.css$/,
73+
use: [
74+
'style-loader',
75+
{ loader: 'css-loader', options: { importLoaders: 1 } },
76+
{ loader: 'postcss-loader', options: {
77+
ident: 'postcss',
78+
plugins: () => [
79+
postcssDoublePositionGradients(/* pluginOptions */)
80+
]
81+
} }
82+
]
83+
}
84+
]
85+
}
86+
}
87+
```
88+
89+
## Create React App
90+
91+
Add [React App Rewired] and [React App Rewire PostCSS] to your project:
92+
93+
```bash
94+
npm install react-app-rewired react-app-rewire-postcss --save-dev
95+
```
96+
97+
Use [React App Rewire PostCSS] and [PostCSS Double Position Gradients] in your
98+
`config-overrides.js` file:
99+
100+
```js
101+
const reactAppRewirePostcss = require('react-app-rewire-postcss');
102+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
103+
104+
module.exports = config => reactAppRewirePostcss(config, {
105+
plugins: () => [
106+
postcssDoublePositionGradients(/* pluginOptions */)
107+
]
108+
});
109+
```
110+
111+
## Gulp
112+
113+
Add [Gulp PostCSS] to your project:
114+
115+
```bash
116+
npm install gulp-postcss --save-dev
117+
```
118+
119+
Use [PostCSS Double Position Gradients] in your Gulpfile:
120+
121+
```js
122+
const postcss = require('gulp-postcss');
123+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
124+
125+
gulp.task('css', () => gulp.src('./src/*.css').pipe(
126+
postcss([
127+
postcssDoublePositionGradients(/* pluginOptions */)
128+
])
129+
).pipe(
130+
gulp.dest('.')
131+
));
132+
```
133+
134+
## Grunt
135+
136+
Add [Grunt PostCSS] to your project:
137+
138+
```bash
139+
npm install grunt-postcss --save-dev
140+
```
141+
142+
Use [PostCSS Double Position Gradients] in your Gruntfile:
143+
144+
```js
145+
const postcssDoublePositionGradients = require('postcss-double-position-gradients');
146+
147+
grunt.loadNpmTasks('grunt-postcss');
148+
149+
grunt.initConfig({
150+
postcss: {
151+
options: {
152+
use: [
153+
postcssDoublePositionGradients(/* pluginOptions */)
154+
]
155+
},
156+
dist: {
157+
src: '*.css'
158+
}
159+
}
160+
});
161+
```
162+
163+
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
164+
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
165+
[PostCSS]: https://github.com/postcss/postcss
166+
[PostCSS CLI]: https://github.com/postcss/postcss-cli
167+
[PostCSS Loader]: https://github.com/postcss/postcss-loader
168+
[PostCSS Double Position Gradients]: https://github.com/jonathantneal/postcss-double-position-gradients
169+
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
170+
[React App Rewired]: https://github.com/timarney/react-app-rewired

0 commit comments

Comments
 (0)