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

Commit aadf18c

Browse files
committed
5.0.0
1 parent 77742dd commit aadf18c

29 files changed

+1108
-4596
lines changed

.babelrc

-13
This file was deleted.

.editorconfig

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# editorconfig.org
21
root = true
32

43
[*]
54
charset = utf-8
6-
indent_style = space
7-
indent_size = 2
85
end_of_line = lf
9-
trim_trailing_whitespace = true
6+
indent_style = tab
107
insert_final_newline = true
8+
trim_trailing_whitespace = true
119

1210
[*.md]
1311
trim_trailing_whitespace = false
12+
13+
[*.{json,md,yml}]
14+
indent_size = 2
15+
indent_style = space

.eslintignore

-1
This file was deleted.

.eslintrc.yml

-36
This file was deleted.

.gitignore

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
.DS_Store
2-
*.sublime-workspace
3-
41
node_modules
5-
test/fixtures/*/actual.css
6-
dist
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

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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.mjs', format: 'es' }
8+
],
9+
plugins: [
10+
babel({
11+
plugins: [
12+
'@babel/plugin-syntax-dynamic-import'
13+
],
14+
presets: [
15+
['@babel/env', { modules: false, targets: { node: 6 } }]
16+
]
17+
})
18+
]
19+
};

.tape.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = {
2+
'postcss-custom-selectors': {
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+
'basic:import': {
13+
message: 'supports { importFrom: { customSelectors: { ... } } } usage',
14+
options: {
15+
importFrom: {
16+
customSelectors: {
17+
':--heading': 'h1, h2, h3'
18+
}
19+
}
20+
}
21+
},
22+
'basic:import-json': {
23+
message: 'supports { importFrom: "test/import-selectors.json" } usage',
24+
options: {
25+
importFrom: 'test/import-selectors.json'
26+
},
27+
expect: 'basic.import.expect.css',
28+
result: 'basic.import.result.css'
29+
},
30+
'basic:import-js': {
31+
message: 'supports { importFrom: "test/import-selectors.js" } usage',
32+
options: {
33+
importFrom: 'test/import-selectors.js'
34+
},
35+
expect: 'basic.import.expect.css',
36+
result: 'basic.import.result.css'
37+
},
38+
'basic:import-css': {
39+
message: 'supports { importFrom: "test/import-selectors.css" } usage',
40+
options: {
41+
importFrom: 'test/import-selectors.css'
42+
},
43+
expect: 'basic.import.expect.css',
44+
result: 'basic.import.result.css'
45+
}
46+
}
47+
};

.travis.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
sudo: false
1+
# https://docs.travis-ci.com/user/travis-lint
2+
23
language: node_js
4+
35
node_js:
4-
- stable
5-
- "8"
6-
- "6"
6+
- 6
7+
8+
install:
9+
- npm install --ignore-scripts

CHANGELOG.md

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,56 @@
1-
# 4.0.1 - 2017-05-15
1+
# Changes to PostCSS Custom Selectors
2+
3+
### 5.0.0 (September 7, 2018)
4+
5+
- Added: New `preserve` option to preserve custom selectors and rules using them
6+
- Added: New `importFrom` option to specify where to import custom selectors
7+
- Added: Support for PostCSS v7
8+
- Added: Support for Node v6+
9+
10+
### 4.0.1 (May 15, 2017)
211

312
- Fixed: incorrect export
413

5-
# 4.0.0 - 2017-05-12
14+
### 4.0.0 (May 12, 2017)
615

716
- Added: compatibility with postcss v6.x
817

9-
# 3.0.0 - 2015-08-25
18+
### 3.0.0 (August 25, 2015)
1019

1120
- Removed: compatibility with postcss v4.x
1221
- Added: compatibility with postcss v5.x
1322

14-
# 2.3.0 - 2015-07-14
23+
### 2.3.0 (July 14, 2015)
1524

1625
* Fixed: Nested/mixed selectors now works correctly
1726
([#19](https://github.com/postcss/postcss-custom-selectors/issues/19))
1827
* Added: `transformMatches` option to limit transformation to :matches()
1928
replacements.
2029

21-
# 2.2.0 - 2015-06-30
30+
### 2.2.0 (June 30, 2015)
2231

2332
* Fixed: No more useless warnings for undefined non custom selectors
2433
([#22](https://github.com/postcss/postcss-custom-selectors/issues/22))
2534
* Changed: warnings now use PostCSS message API
2635

27-
# 2.1.1 - 2015-06-30
36+
### 2.1.1 (June 30, 2015)
2837

2938
* Fixed: the lineBreak option keeping the selectors indent
3039
([#18](https://github.com/postcss/postcss-custom-selectors/issues/18))
3140
* Fixed: the tip of an undefined selector
3241
([#20](https://github.com/postcss/postcss-custom-selectors/issues/20))
3342

34-
# 2.1.0 - 2015-06-04
43+
### 2.1.0 (June 4, 2015)
3544

3645
* Changed: use PostCSS 4.1 plugin API
3746
([#13](https://github.com/postcss/postcss-custom-selectors/issues/13))
3847

39-
# 2.0.1 - 2015-06-03
48+
### 2.0.1 (June 3, 2015)
4049

4150
* Fixed: `(foo, bar)` conversion error exists in the selector
4251
(See also [:matches() test](test/fixtures/matches/input.css))
4352

44-
# 2.0.0 - 2015-05-29
53+
### 2.0.0 (May 29, 2015)
4554

4655
* Removed: no longer support `::` or `--` to defined a custom selectors,
4756
you must use the syntax `:--` to define it.
@@ -50,14 +59,14 @@ you must use the syntax `:--` to define it.
5059
([#14](https://github.com/postcss/postcss-custom-selectors/issues/14))
5160

5261

53-
# 1.1.1 - 2015-04-06
62+
### 1.1.1 (April 6, 2015)
5463

5564
* Fixed: add support for multilines definition
5665

57-
# 1.1.0 - 2014-12-06
66+
### 1.1.0 (December 6, 2014)
5867

5968
* Added: "lineBreak" option
6069

61-
# 1.0.0 - 2014-12-06
70+
### 1.0.0 (December 6, 2014)
6271

6372
* First release

CONTRIBUTING.md

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

0 commit comments

Comments
 (0)