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

Commit c603308

Browse files
committed
Prepare release + add some docs about WHY
1 parent 0e3abb6 commit c603308

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- Added: support for PostCSS v5.x
44
- Removed: support for PostCSS v4.x
5+
56
---
67

78
For pre 2.0.0 information, please visit [cssnext CHANGELOG](https://github.com/cssnext/cssnext/blob/master/CHANGELOG.md)

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,42 @@
1111
cssnext is a CSS transpiler that allows you to use the latest CSS syntax today.
1212
It transforms CSS specs into more compatible CSS so you don’t need to wait for browser support.
1313

14-
**This repository contains the PostCSS plugin.**
14+
---
15+
16+
# This repository contains the PostCSS plugin.
17+
18+
## Why **postcss-cssnext** ? What is the difference with **cssnext** ?
19+
20+
cssnext was at first designed to be a complete tool, before PostCSS became
21+
popular and so includes some options that does not really belong in a PostCSS
22+
plugin (options like `import`, `url`, `compress`, `plugins`).
23+
This days, most people use PostCSS directly so we decided to make integration of
24+
cssnext more simple by providing a simple (real) plugin.
25+
26+
If you were using cssnext with some options here is what you need to know:
27+
28+
- `import`: just add in your plugins list
29+
[postcss-import](https://github.com/postcss/postcss-import)
30+
- `url`: just add in your plugins list
31+
[postcss-url](https://github.com/postcss/postcss-url)
32+
- `compress`: just add in your plugins list
33+
[cssnano](https://github.com/ben-eb/cssnano)
34+
- `plugins`: just add the plugins directly in your list
35+
- `messages`: see
36+
[postcss-reporter](https://github.com/postcss/postcss-reporter)
37+
and
38+
[postcss-browser-reporter](https://github.com/postcss/postcss-browser-reporter)
39+
- `sourcemap`, `map`, `to`, `from`: see
40+
[PostCSS source map documentation](https://github.com/postcss/postcss#source-map)
41+
42+
43+
## But I like cssnext as it was !
44+
45+
_Don't worry. That's why we created another package._
46+
**cssnext** package will have a major release soon in order to introduce a minor
47+
but breaking changes in the Node.js API, but you will get the same tool as
48+
before.
49+
The nice thing is: **cssnext** will use **postcss-cssnext** under the hood.
1550

1651
---
1752

src/__tests__/option.features.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import toSlug from "to-slug-case"
1414
const testFeature = function(
1515
t,
1616
feature,
17-
version,
1817
source,
1918
input,
2019
expected
@@ -30,12 +29,12 @@ const testFeature = function(
3029
t.notEqual(
3130
css,
3231
expected,
33-
version + ": should not add " + feature + " support if disabled"
32+
"should not add " + feature + " support if disabled"
3433
)
3534
t.equal(
3635
css,
3736
input,
38-
version + ": should not modify input if " + feature + " is disabled"
37+
"should not modify input if " + feature + " is disabled"
3938
)
4039

4140
// enable only the one we want to test...
@@ -44,7 +43,7 @@ const testFeature = function(
4443
t.equal(
4544
cssnext(options).process(input).css.trim(),
4645
expected.trim(),
47-
version + ": should add " + feature + " support"
46+
"should add " + feature + " support"
4847
)
4948
}
5049

@@ -55,7 +54,7 @@ Object.keys(features).forEach(function(name) {
5554
const expected = utils.readFixture(join("features", slug + ".expected"))
5655

5756
test(slug, function(t) {
58-
testFeature(t, name, "node.js", source, input, expected)
57+
testFeature(t, name, source, input, expected)
5958

6059
t.end()
6160
})

0 commit comments

Comments
 (0)