Skip to content

Commit dd8549d

Browse files
committed
Internal: upgrade to babel@6 / eslint@2 / react@15
1 parent e693d4f commit dd8549d

File tree

23 files changed

+258
-589
lines changed

23 files changed

+258
-589
lines changed

.babelrc

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

.eslintrc

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

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
- Added: cssnext will now warn you when you have duplicates plugins.
22
This is a really common mistake, people include plugins that are already
3-
included in cssnext and maybe sometimes in an inaccurate position.
3+
included in cssnext and maybe sometimes in an inaccurate position.
44
**Most tutorial on the internet are wrong (probably 99%)
55
and show provide duplicates in their examples.
6-
(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
7-
In order to fix this, here is a warning. You are welcome.
6+
(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
7+
_In order to fix this, here is a warning. You are welcome._
88
[Read more about this issue](https://github.com/postcss/postcss/issues/764)
99
- Added: ``rem`` will now adjust its behavior according to browser option
1010
(IE 9 and IE 10 will only have ``px`` in some places, where rem support is

docs/content/usage.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ var output = cssnext(input, {
6666
_(default: true)_
6767

6868
This option should be left with its default value, unless you really know what
69-
you are doing.
70-
Most tutorial on the internet are wrong and show provide duplicate
71-
(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).
69+
you are doing.
70+
**Most tutorial on the internet are wrong (probably 99%)
71+
and show provide duplicates in their examples.
72+
(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
73+
_In order to fix this, here is a warning. You are welcome._
74+
75+
---
7276

7377
**To know all available options, please check corresponding postcss plugin by
7478
browsing the
75-
[feature mapping](https://github.com/MoOx/postcss-cssnext/blob/master/src/features.js).**
79+
[feature mapping](https://github.com/MoOx/postcss-cssnext/blob/master/src/features.js)**
7680

7781
_Note: order is important to get everything working correctly._

docs/scripts/webpack-dev-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default (config, options) => {
2020

2121
const devEntries = [
2222
`webpack-dev-server/client?${serverUrl}`,
23-
`webpack/hot/only-dev-server`,
23+
"webpack/hot/only-dev-server",
2424
]
2525

2626
const devConfig = {

docs/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
@import "cssrecipes-vertical-rhythm";
1313
@import "cssrecipes-vertical-rhythm/lib/ratio/minor-third.css";
1414

15+
@import "react-svg-inline/lib/index.css";
1516
@import "./modules/Header";
1617
@import "./modules/Footer";
17-
@import "./modules/SVGIcon";
1818
@import "./modules/playground";
1919

2020
@custom-media --r-maxXL (max-width: 90em);

docs/src/layouts/Default.js

Lines changed: 49 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,7 @@ import Html from "../modules/Html"
77
import Head from "../modules/Head"
88
import Body from "../modules/Body"
99

10-
export default class Default extends Component {
11-
12-
static propTypes = {
13-
pkg: PropTypes.object.isRequired,
14-
metadata: PropTypes.object.isRequired,
15-
// collections: PropTypes.object.isRequired,
16-
file: PropTypes.object.isRequired,
17-
}
18-
19-
static childContextTypes = {
20-
pkg: PropTypes.object.isRequired,
21-
// collections: PropTypes.object.isRequired,
22-
file: PropTypes.object.isRequired,
23-
}
10+
class Default extends Component {
2411

2512
getChildContext() {
2613
return {
@@ -42,48 +29,48 @@ export default class Default extends Component {
4229
return (
4330
<Html>
4431
<Head
45-
title={file.title}
46-
stylesheets={this.props.metadata.assets.stylesheets}
32+
title={ file.title }
33+
stylesheets={ this.props.metadata.assets.stylesheets }
4734
/>
4835
<Body
49-
scripts={[
36+
scripts={ [
5037
...file.scripts || [],
5138
...this.props.metadata.assets.scripts || [],
52-
]}
53-
version={this.props.metadata.assets.version}
54-
footer={footer}
39+
] }
40+
version={ this.props.metadata.assets.version }
41+
footer={ footer }
5542
>
5643
<header
57-
className={cx({
44+
className={ cx({
5845
"cssnext-Jumbotron": true,
5946
"cssnext-Jumbotron--default": true,
6047
["cssnext-Jumbotron--" + dashify(file.url)]: true,
6148
["cssnext-Jumbotron--" + file.backgroundModifier]:
6249
file.backgroundModifier,
63-
})}
50+
}) }
6451
>
6552
<div className="r-Grid">
6653
<div className="r-Grid-cell">
6754
{
6855
file.title &&
6956
<h1
70-
className={cx(
57+
className={ cx(
7158
"cssnext-Jumbotron-title",
7259
"cssnext-Light"
73-
)}
60+
) }
7461
>
75-
{file.title}
62+
{ file.title }
7663
</h1>
7764
}
7865
{
7966
file.subtitle &&
8067
<strong
81-
className={cx(
68+
className={ cx(
8269
"cssnext-Jumbotron-subtitle",
8370
"cssnext-Light"
84-
)}
71+
) }
8572
>
86-
{file.subtitle}
73+
{ file.subtitle }
8774
</strong>
8875
}
8976
</div>
@@ -94,58 +81,62 @@ export default class Default extends Component {
9481
file.incomplete &&
9582
<section className="r-Grid cssnext-Callout cssnext-Callout--info">
9683
<div className="r-Grid-cell">
97-
<div className="cssnext-Callout-title h4">Incomplete</div>
84+
<div className="cssnext-Callout-title h4">
85+
{ "Incomplete" }
86+
</div>
9887
<p>
9988
{
10089
"This documentation is still a work in progress. "
10190
}
10291
<br />
10392
<a
104-
href={
105-
"https://github.com/MoOx/postcss-cssnext/issues" +
106-
"?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+documentation%22"
107-
}>
108-
Pull requests
93+
href={
94+
"https://github.com/MoOx/postcss-cssnext/issues" +
95+
"?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+documentation"
96+
}
97+
>
98+
{ "Pull requests" }
10999
</a>
110100
{
111101
" expanding on existing or adding additional content " +
112102
" are "
113103
}
114-
<strong>extremely</strong> appreciated.
104+
<strong>{ "extremely" }</strong>{ " appreciated." }
115105
</p>
116106
</div>
117107
</section>
118108
}
119109

120110
<section className="r-Grid cssnext-Section">
121111
<div
122-
className={cx({
112+
className={ cx({
123113
[file.className]: file.className,
124114
"r-Grid-cell": true,
125115
"js-markdownIt-TOCOriginalContainer": true,
126-
})}
127-
dangerouslySetInnerHTML={{ __html: file.contents }}
116+
}) }
117+
dangerouslySetInnerHTML={ { __html: file.contents } }
128118
/>
129119
<div
130-
className={cx({
120+
className={ cx({
131121
"r-Grid-cell": true,
132122
"js-markdownIt-TOCPlaceholder": true,
133-
})}
123+
}) }
134124
/>
135125
</section>
136126

137127
{
138128
footer &&
139129
<div
140-
className={cx(
130+
className={ cx(
141131
"cssnext-Jumbotron",
142132
"cssnext-Jumbotron--default",
143133
"cssnext-Center",
144134
"cssnext-Light"
145-
)}>
135+
) }
136+
>
146137
<div className="cssnext-Jumbotron-title">
147138
<a href="/playground/">
148-
Try postcss-cssnext in your browser now.
139+
{ "Try postcss-cssnext in your browser now." }
149140
</a>
150141
</div>
151142
</div>
@@ -156,3 +147,18 @@ export default class Default extends Component {
156147
)
157148
}
158149
}
150+
151+
Default.propTypes = {
152+
pkg: PropTypes.object.isRequired,
153+
metadata: PropTypes.object.isRequired,
154+
// collections: PropTypes.object.isRequired,
155+
file: PropTypes.object.isRequired,
156+
}
157+
158+
Default.childContextTypes = {
159+
pkg: PropTypes.object.isRequired,
160+
// collections: PropTypes.object.isRequired,
161+
file: PropTypes.object.isRequired,
162+
}
163+
164+
export default Default

docs/src/layouts/Simple.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,7 @@ import Html from "../modules/Html"
44
import Head from "../modules/Head"
55
import Body from "../modules/Body"
66

7-
export default class Simple extends Component {
8-
9-
static propTypes = {
10-
pkg: PropTypes.object.isRequired,
11-
metadata: PropTypes.object.isRequired,
12-
// collections: PropTypes.object.isRequired,
13-
file: PropTypes.object.isRequired,
14-
}
15-
16-
static childContextTypes = {
17-
pkg: PropTypes.object.isRequired,
18-
// collections: PropTypes.object.isRequired,
19-
file: PropTypes.object.isRequired,
20-
}
7+
class Simple extends Component {
218

229
getChildContext() {
2310
return {
@@ -39,23 +26,38 @@ export default class Simple extends Component {
3926
return (
4027
<Html>
4128
<Head
42-
title={file.title}
43-
stylesheets={this.props.metadata.assets.stylesheets}
29+
title={ file.title }
30+
stylesheets={ this.props.metadata.assets.stylesheets }
4431
/>
4532
<Body
46-
scripts={[
33+
scripts={ [
4734
...file.scripts || [],
4835
...this.props.metadata.assets.scripts || [],
49-
]}
50-
version={this.props.metadata.assets.version}
51-
footer={footer}
36+
] }
37+
version={ this.props.metadata.assets.version }
38+
footer={ footer }
5239
>
5340
<div
54-
className={file.className || ""}
55-
dangerouslySetInnerHTML={{ __html: file.contents }}
41+
className={ file.className || "" }
42+
dangerouslySetInnerHTML={ { __html: file.contents } }
5643
/>
5744
</Body>
5845
</Html>
5946
)
6047
}
6148
}
49+
50+
Simple.propTypes = {
51+
pkg: PropTypes.object.isRequired,
52+
metadata: PropTypes.object.isRequired,
53+
// collections: PropTypes.object.isRequired,
54+
file: PropTypes.object.isRequired,
55+
}
56+
57+
Simple.childContextTypes = {
58+
pkg: PropTypes.object.isRequired,
59+
// collections: PropTypes.object.isRequired,
60+
file: PropTypes.object.isRequired,
61+
}
62+
63+
export default Simple

0 commit comments

Comments
 (0)