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

Commit 3605b5f

Browse files
committed
1.0.0
0 parents  commit 3605b5f

16 files changed

+665
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
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

.gitignore

Lines changed: 11 additions & 0 deletions
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

.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', 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+
};

.tape.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
'postcss-short-overflow': {
3+
'basic': {
4+
message: 'supports basic usage'
5+
},
6+
'prefix': {
7+
message: 'supports prefix usage'
8+
},
9+
'prefix:opt': {
10+
message: 'supports { prefix: "x" } prefix usage',
11+
options: {
12+
prefix: 'x'
13+
},
14+
expect: 'basic.expect.css',
15+
expect: 'basic.result.css'
16+
}
17+
}
18+
};

.travis.yml

Lines changed: 9 additions & 0 deletions
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

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changes to PostCSS Short Overflow
2+
3+
### 1.0.0 (October 9, 2018)
4+
5+
- Initial version

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to PostCSS Short Overflow
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-short-overflow.git
24+
25+
# Navigate to the newly cloned directory
26+
cd postcss-short-overflow
27+
28+
# Assign the original repo to a remote called "upstream"
29+
git remote add upstream git@github.com:jonathantneal/postcss-short-overflow.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

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Installing PostCSS Short Overflow
2+
3+
[PostCSS Short Overflow] 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 Short Overflow] to your project:
11+
12+
```bash
13+
npm install postcss-short-overflow --save-dev
14+
```
15+
16+
Use [PostCSS Short Overflow] to process your CSS:
17+
18+
```js
19+
const postcssShortOverflow = require('postcss-short-overflow');
20+
21+
postcssShortOverflow.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 postcssShortOverflow = require('postcss-short-overflow');
29+
30+
postcss([
31+
postcssShortOverflow(/* 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 Short Overflow] in your `postcss.config.js` configuration file:
44+
45+
```js
46+
const postcssShortOverflow = require('postcss-short-overflow');
47+
48+
module.exports = {
49+
plugins: [
50+
postcssShortOverflow(/* 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 Short Overflow] in your Webpack configuration:
64+
65+
```js
66+
const postcssShortOverflow = require('postcss-short-overflow');
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+
postcssShortOverflow(/* 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 Short Overflow] in your
98+
`config-overrides.js` file:
99+
100+
```js
101+
const reactAppRewirePostcss = require('react-app-rewire-postcss');
102+
const postcssShortOverflow = require('postcss-short-overflow');
103+
104+
module.exports = config => reactAppRewirePostcss(config, {
105+
plugins: () => [
106+
postcssShortOverflow(/* 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 Short Overflow] in your Gulpfile:
120+
121+
```js
122+
const postcss = require('gulp-postcss');
123+
const postcssShortOverflow = require('postcss-short-overflow');
124+
125+
gulp.task('css', () => gulp.src('./src/*.css').pipe(
126+
postcss([
127+
postcssShortOverflow(/* 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 Short Overflow] in your Gruntfile:
143+
144+
```js
145+
const postcssShortOverflow = require('postcss-short-overflow');
146+
147+
grunt.loadNpmTasks('grunt-postcss');
148+
149+
grunt.initConfig({
150+
postcss: {
151+
options: {
152+
use: [
153+
postcssShortOverflow(/* 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 Short Overflow]: https://github.com/jonathantneal/postcss-short-overflow
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)