Skip to content

Commit a6f766d

Browse files
committed
v1.0.0
1 parent aae0a22 commit a6f766d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6264
-47
lines changed

.eslintrc

100755100644
File mode changed.

.gitignore

100755100644
Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,54 @@
1-
node_modules
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
*.pid.lock
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
# nyc test coverage
17+
.nyc_output
18+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19+
.grunt
20+
# Bower dependency directory (https://bower.io/)
21+
bower_components
22+
# node-waf configuration
23+
.lock-wscript
24+
# Compiled binary addons (http://nodejs.org/api/addons.html)
25+
build/Release
26+
# Dependency directories
27+
node_modules
28+
jspm_packages
29+
# Optional npm cache directory
30+
.npm
31+
# Optional REPL history
32+
.node_repl_history
33+
# Output of 'npm pack'
34+
*.tgz
35+
36+
# Yarn Integrity file
37+
.yarn-integrity
38+
39+
# dotenv environment variables file
40+
.env
41+
# OS or Editor folders
42+
._*
43+
.cache
44+
.DS_Store
45+
.vscode
46+
.idea
47+
.project
48+
.settings
49+
.tmproj
50+
*.esproj
51+
*.sublime-project
52+
*.sublime-workspace
53+
nbproject
54+
Thumbs.db

.travis.yml

100755100644
File mode changed.

CHANGELOG.md

100755100644
Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,121 @@
11
### HEAD
22

3-
### 1.0.0
3+
### 4.0.0 (April 18, 2017)
4+
5+
* Drop support for Node 0.12
6+
* Update `postcss-easy-import` to `2.0.0`
7+
* Update `fs-extra` to `2.1.2`
8+
* Update `autoprefixer` to `6.7.7`
9+
* Update `postcss-apply` to `0.6.1`
10+
* Update `postcss-color-function` to `3.0.0`
11+
* Update `postcss-reporter` to `3.0.0`
12+
* Update `postcss` to `5.2.17`
13+
* Update `stylelint-config-suitcss` to `11.0.0`
14+
* Update `stylelint` to `7.10.1`
15+
* Update `devDependencies` to latest
16+
17+
### 3.0.1 (December 09, 2016)
18+
19+
* Fix: Allow `--importRoot` to override root config option [#70](https://github.com/suitcss/preprocessor/pull/70)
20+
* Fix: Setting `lint` to false also disables `postcss-bem-linter` [#68](https://github.com/suitcss/preprocessor/pull/68)
21+
* Allow config file to be arbitrarily named [#66](https://github.com/suitcss/preprocessor/pull/66)
22+
* Fix: `undefined` cli flags don't override config [#62](https://github.com/suitcss/preprocessor/pull/62)
23+
* Update `postcss-reporter` to `^2.0.0` [#63](https://github.com/suitcss/preprocessor/pull/63)
24+
25+
### 3.0.0 (October 20, 2016)
26+
27+
* Pin core plugins order:
28+
29+
`postcss-easy-import`
30+
[ user plugins ]
31+
[ encapsulation plugins ]
32+
`autoprefixer`
33+
`postcss-reporter`
34+
* Add experimental `encapsulate` option/feature
35+
* CLI flags override config file options
36+
* Input file is now linted (previously only imported files were passed through
37+
the linting tools)
38+
* Add `--throw-error` (`-e`) to CLI
39+
* Enable `lint` option by default
40+
* Add `postcss-apply`
41+
* Add `postcss-color-function`
42+
* Add `debug` option to pass an `postcss-debug` instance
43+
* Allow usage of `transform` and `onImport` in `postcss-easy-import`
44+
* Remove `beforeLint` feature
45+
* Add default browsers list for autoprefixer
46+
* Use `stylelint-config-suitcss` from within the preprocessor. No longer needs
47+
to be installed locally by the consumer.
48+
49+
### 2.0.0 (April 12, 2016)
50+
51+
* Switch to `postcss-easy-import`
52+
* Major release to correct previous upgrade to stylelint 5.x
53+
54+
### 1.0.2 (March 17, 2016)
55+
56+
* Upgrade `stylelint` to `^5.0.1`
57+
58+
### 1.0.1 (February 17, 2016)
59+
60+
* Fix issue with CSS returned from `beforeLint` not being used correctly - [a07bb8c](https://github.com/suitcss/preprocessor/commit/a07bb8c7b416c3df36c3f88b1fc1600aa6a39d61)
61+
* Fix incorrect date in CHANGELOG.md
62+
63+
### 1.0.0 (February 08, 2016)
64+
65+
* Upgrade `stylelint` to version `4.2.0`
66+
* Upgrade `postcss-import` to `8.0.2`
67+
* Improve tests
68+
* Use `stylelint-config-suitcss` as a dev dependency as it must be installed
69+
where the preprocessor is being used.
70+
71+
### 0.8.0 (December 01, 2015)
72+
73+
* Add [stylelint](http://stylelint.io/) as an optional linting step
74+
75+
### 0.7.0 (November 27, 2015)
76+
77+
* Add `beforeLint` function which allows imported CSS to be manipulated before linting
78+
* Flatten configuration options so that PostCSS specific settings are no longer
79+
inside `config: {}`.
80+
81+
### 0.6.0 (November 25, 2015)
82+
83+
* [Allow re-ordering](https://github.com/suitcss/preprocessor/pull/15) of the `use` plugins array from config
84+
* Update `autoprefixer` to `^6.1.1`
85+
* Update `postcss-bem-linter` to `^2.3.0`
86+
87+
### 0.5.1 (November 24, 2015)
88+
89+
* [Fix issue](https://github.com/suitcss/preprocessor/issues/13) with options not being passed to `postcss-bem-linter` and `postcss-reporter`
90+
91+
### 0.5.0 (November 23, 2015)
92+
93+
* Switch from Rework to PostCSS
94+
* Add support for configuration file (`-c`)
95+
* Move `--compress` to `--minify` and use cssnano
96+
* Fix `--watch` to run when imported files change
97+
* Allow additional PostCSS plugins to be added to the pipeline
98+
* Node API now returns a promise
99+
* Upgrade existing `package.json` dependencies
100+
101+
### 0.4.0 (July 1, 2014)
102+
103+
* Update 'rework-suit' to ^4.0.0.
104+
105+
### 0.3.0 (June 21, 2014)
106+
107+
* Add 'import-root' CLI option.
108+
* Add 'compress' CLI option.
109+
* Update 'autoprefixer' to ^1.3.0.
110+
* Update 'rework-suit' to ^3.0.0.
111+
* Update 'rework' to ^1.0.0.
112+
* Support configuration.
113+
114+
### 0.2.0 (April 21, 2014)
115+
116+
* Update 'autoprefixer' to ^1.1.20140410.
117+
* Update 'rework-suit' to 2.0.x.
118+
119+
### 0.1.1 (March 24, 2014)
4120

5121
* Initial release

LICENSE

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

LICENSE.md

100755100644
File mode changed.

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cssplus-preprocessor
22

3-
> A future-facing CSS preprocessor for working with cssplus, clone [suitcss-preprocessor](https://github.com/suitcss/preprocessor).
3+
> A future-facing CSS preprocessor for working with cssplus; clone [suitcss-preprocessor](https://github.com/suitcss/preprocessor).
44
55
Provides a CLI and Node.js interface for a preprocessor that combines
66
various [PostCSS](https://github.com/postcss/postcss) plugins.
@@ -267,17 +267,18 @@ which is the recommended approach in a SUIT CSS application.
267267
* Type: `Boolean`
268268
* Default: `true`
269269

270-
[stylelint-config-cssplus](https://github.com/thoughtbit/stylelint-config-cssplus) package.
270+
Ensure code conforms to the [SUIT code style](https://github.com/suitcss/suit/blob/master/doc/STYLE.md)
271+
by using the [stylelint-config-suitcss](https://github.com/suitcss/stylelint-config-suitcss) package.
271272

272273
Stylelint [configuration
273274
options](http://stylelint.io/?/docs/user-guide/configuration.md) can also be
274-
overridden but this requires the `stylelint-config-cssplus` to be installed
275+
overridden but this requires the `stylelint-config-suitcss` to be installed
275276
locally in your package.
276277

277278
```js
278279
{
279280
stylelint: {
280-
extends: 'stylelint-config-cssplus',
281+
extends: 'stylelint-config-suitcss',
281282
rules: {
282283
indentation: [4, 'tab'],
283284
}
@@ -377,7 +378,7 @@ module.exports = {
377378
"version": "0.1.0",
378379
"dependencies": {
379380
"postcss-property-lookup": "^1.1.3",
380-
"cssplus-preprocessor": "^1.0.0"
381+
"cssplus-preprocessor": "^0.5.0"
381382
},
382383
"scripts": {
383384
"preprocess": "cssplus -c myconfig.js index.css build/built.css"
@@ -397,22 +398,22 @@ If duplicate plugins are used they will be removed, but the new order will be re
397398
// Default order
398399
var defaults = [
399400
'postcss-cssplus',
400-
'postcss-simple-reset'
401+
'postcss-simple-reset',
401402
];
402403

403404
// config
404405
module.exports = {
405406
use: [
406-
'postcss-mixins',
407-
'postcss-extend',
407+
'postcss-at2x',
408+
'postcss-calc',
408409
]
409410
};
410411

411412
var result = [
412413
'postcss-cssplus',
413414
'postcss-simple-reset',
414-
'postcss-mixins',
415-
'postcss-extend',
415+
'postcss-at2x',
416+
'postcss-calc',
416417
];
417418
```
418419

appveyor.yml

100755100644
File mode changed.

bin/logger.js

100755100644
File mode changed.

lib/encapsulation.js

100755100644
File mode changed.

lib/index.js

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const pify = require('pify');
1313
const postcssEasyImport = require('postcss-easy-import');
1414
const reporter = require('postcss-reporter');
1515
const stylelint = require('stylelint');
16-
const stylelintConfigSuit = require('stylelint-config-cssplus');
16+
const stylelintConfigSuit = require('stylelint-config-suitcss');
1717
let postcss = require('postcss'); // eslint-disable-line prefer-const
1818

1919
module.exports = preprocessor;

package.json

100755100644
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cssplus-preprocessor",
33
"version": "1.0.0",
4-
"description": "A future-facing CSS preprocessor for working with cssplus",
4+
"description": "A CSS preprocessor for working with SUIT CSS",
55
"main": "lib/index.js",
66
"bin": {
77
"cssplus": "bin/cssplus"
@@ -13,8 +13,8 @@
1313
"dependencies": {
1414
"autoprefixer": "^6.7.7",
1515
"chokidar": "^1.3.0",
16-
"colors": "^1.1.2",
17-
"commander": "^2.9.0",
16+
"colors": "~1.1.2",
17+
"commander": "~2.9.0",
1818
"cssnano": "^3.3.2",
1919
"fs-extra": "^2.1.2",
2020
"is-promise": "^2.1.0",
@@ -23,16 +23,21 @@
2323
"object-assign-deep": "0.0.4",
2424
"pad-component": "0.0.1",
2525
"pify": "^2.3.0",
26-
"postcss": "^6.0.13",
27-
"postcss-cssplus": "^1.1.0",
28-
"postcss-simple-reset": "^1.1.1",
26+
"postcss": "^5.2.17",
27+
"postcss-apply": "^0.6.1",
2928
"postcss-autoreset": "^1.2.0",
3029
"postcss-bem-linter": "^2.3.0",
30+
"postcss-calc": "^5.0.0",
31+
"postcss-color-function": "^3.0.0",
32+
"postcss-custom-media": "^5.0.0",
33+
"postcss-custom-properties": "^5.0.0",
34+
"postcss-cssplus": "^1.1.0",
35+
"postcss-simple-reset": "^1.1.1",
3136
"postcss-easy-import": "^2.0.0",
3237
"postcss-reporter": "^3.0.0",
3338
"read-file-stdin": "^0.2.1",
3439
"stylelint": "^8.2.0",
35-
"stylelint-config-cssplus": "^1.0.1"
40+
"stylelint-config-suitcss": "^12.0.0"
3641
},
3742
"devDependencies": {
3843
"browserify": "^14.3.0",
@@ -64,11 +69,12 @@
6469
"preprocessor",
6570
"stylelint",
6671
"pure",
67-
"postcss"
72+
"postcss",
73+
"suit"
6874
],
6975
"authors": [
7076
"moocss <moocss@gmail.com> (https://github.com/moocss)"
7177
],
72-
"repository": "git://github.com/thoughtbit/preprocessor.git",
78+
"repository": "git://github.com/thoughtbit/cssplus-preprocessor.git",
7379
"license": "MIT"
7480
}

test/.eslintrc

100755100644
File mode changed.

test/cli.js

100755100644
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ describe('cli', () => {
5151
});
5252
});
5353

54+
it('should reset the output', done => {
55+
exec('node bin/cssplus -i test/fixtures -c test/config/noautoprefixer.js test/fixtures/reset.css test/fixtures/cli/output.css', err => {
56+
if (err) return done(err);
57+
const res = util.read('fixtures/cli/output');
58+
const expected = util.read('fixtures/reset.out');
59+
expect(res).to.equal(expected);
60+
done();
61+
});
62+
});
63+
5464
it('should allow configurable import root', done => {
5565
exec('node bin/cssplus -i test/fixtures -c test/config/noautoprefixer.js test/fixtures/import.css test/fixtures/cli/output.css', err => {
5666
if (err) return done(err);

test/config/cli-undefined-flags.js

100755100644
File mode changed.

test/config/noautoprefixer.js

100755100644
File mode changed.

test/config/root-fake.js

100755100644
File mode changed.

test/config/root-real.js

100755100644
File mode changed.

test/config/test.config

100755100644
File mode changed.

test/config/test.js

100755100644
File mode changed.

test/encapsulation/browser.js

100755100644
File mode changed.

test/encapsulation/index.js

100755100644
File mode changed.

test/fixtures/cli/error.css

100755100644
File mode changed.

test/fixtures/cli/input.css

100755100644
File mode changed.

test/fixtures/cli/input.out.css

100755100644
File mode changed.

test/fixtures/component.css

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
.Component-item {
2020
display: flex;
21+
2122
@apply --Component-color;
2223
}
2324

2425
@media (--media-query) {
26+
2527
.Component-item {
2628
color: red;
2729
}

test/fixtures/component.out.css

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
.Component-item {
1414
display: flex;
15+
1516
color: green;
1617
}
1718

1819
@media (min-width: 200px) {
20+
1921
.Component-item {
2022
color: red;
2123
}

test/fixtures/config.css

100755100644
File mode changed.

test/fixtures/config.out.css

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
.Component-item {
1414
display: flex;
15+
1516
color: green;
1617
}
1718

1819
@media (min-width: 200px) {
20+
1921
.Component-item {
2022
color: red;
2123
}

test/fixtures/encapsulation.css

100755100644
File mode changed.

0 commit comments

Comments
 (0)