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

Commit d69aa85

Browse files
committed
Website
Close #102 Close #103 Close #113
1 parent 1404b82 commit d69aa85

Some content is hidden

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

51 files changed

+3245
-400
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"stage": 0
3+
}

.eslintrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
---
2+
# babel support more syntax stuff than eslint for now
3+
parser: babel-eslint
4+
25
ecmaFeatures:
36
modules: true
7+
jsx: true
48

59
env:
610
es6: true
711
browser: true
812
node: true
913

14+
globals:
15+
# for docs
16+
__DEV__: true
17+
__PROD__: true
18+
__SERVER_PROTOCOL__: true
19+
__SERVER_HOSTNAME__: true
20+
__SERVER_PORT__: true
21+
__SERVER_HOST__: true
22+
__SERVER_URL__: true
23+
__LR_SERVER_PORT__: true
24+
25+
plugins:
26+
- react
27+
1028
# 0: off, 1: warning, 2: error
1129
rules:
1230
# max 80 chars per line
@@ -50,3 +68,17 @@ rules:
5068

5169
# enforce comma at eol (never before)
5270
comma-style: [2, "last"]
71+
72+
# see globals
73+
no-underscore-dangle: 0
74+
75+
# eslint-plugin-react rules
76+
react/no-multi-comp: 2
77+
react/prop-types: 2
78+
react/display-name: 2
79+
react/wrap-multilines: 2
80+
react/self-closing-comp: 2
81+
react/no-did-mount-set-state: 2
82+
react/no-did-update-set-state: 2
83+
react/jsx-uses-react: 2
84+
react/jsx-uses-vars: 2

.gitignore

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

33
# standalone build
44
dist
5+
docs/dist
56

67
# fixtures
78
test/**/*.actual.css

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ notifications:
1414
on_failure: always
1515
use_notice: true
1616
skip_join: true
17+
18+
script:
19+
- npm run test
20+
- npm run docs-test

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Contributing
2+
3+
_cssnext uses a lot of [postcss](https://github.com/postcss) plugins,
4+
so you might need to take a look at them if you find an issue or want to create
5+
or enhance a feature._
6+
7+
Otherwise, fork, work on a branch, install dev-dependencies,
8+
respect coding style & run tests before submitting a bug fix or a feature.
9+
10+
```console
11+
$ git clone https://github.com/YOU/cssnext.git
12+
$ npm install
13+
$ npm test
14+
$ git checkout -b fix.bug423
15+
```
16+
17+
### Add a feature
18+
19+
1. Add test files (input + expected output) in [`test/fixtures/features`](test/features)
20+
- If the feature can affect some others, update [`test/fixtures/cases/example.css`](test/cases/example.css) to test integration with other features
21+
- Run test, & check tests are broken (otherwise feature is useless)
22+
- Choose a pretty simple and clear name (that match the specs)
23+
- Add the feature in the [README features list](#features) (title, link to spec, link of the plugin, short desc)
24+
- Add the feature in the [README node.js options list](#features-default-all-features) (camelCaseName)
25+
- Add the dependency in the [`package.json`](package.json)
26+
- Add the feature in the source (in [`index.js`](index.js)), in the appropriate place (order matter)
27+
- Run test and be happy
28+
- Add feature in [the docs](docs/content)
29+
- Add feature on [the playground](https://github.com/cssnext/playground) example

0 commit comments

Comments
 (0)