cssnext uses a lot of postcss plugins, so you might need to take a look at them if you find an issue or want to create or enhance a feature.
Otherwise, fork, work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
$ git clone https://github.com/YOU/cssnext.git
$ npm install
$ npm test
$ git checkout -b fix.bug423
npm test
will compile what is need to be and run all tests.
If you want to work on one test only, you can run something like
$ babel-tape-runner src/__tests__/option.browsers.js
Be sure to have in your PATH ./node_modules/.bin
so you can use local
module directly in console.
- Add test files (input + expected output) in
src/__tests__/fixtures/features
-
If the feature can affect some others, update
src/__tests__/fixtures/cases/example.css
to test integration with other features -
Choose a pretty simple and clear name (that match the specs)
-
Add the feature in the README features list (title, link to spec, link of the plugin, short desc)
-
Add the feature in the README node.js options list (camelCaseName)
-
Add the dependency in the
package.json
-
Add the feature in the source (in
index.js
), in the appropriate place (order matter) For now, use a empty function instead of the right module -
Run test, & check tests are broken (otherwise feature is useless) Now, call the right plugin
-
Run test and be happy
-
Add feature in the docs
-
Add feature on the playground example
- default styles are in src/option.messages.browser.styles.js
- test render by running:
babel-node src/__tests__/messages
. Styles will be compiled, rendered in a web page & the webpage will be opened for you.