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

Commit

Permalink
add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Jan 22, 2018
1 parent 77d9632 commit 6201bae
Show file tree
Hide file tree
Showing 49 changed files with 3,287 additions and 2,989 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
lib
src/__tests__/fixtures
416 changes: 205 additions & 211 deletions CHANGELOG.md

Large diffs are not rendered by default.

27 changes: 21 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
As contributors and maintainers of this project, we pledge to respect all people
who contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Examples of unacceptable behavior by participants include the use of sexual
language or imagery, derogatory comments or personal attacks, trolling, public
or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct. Project maintainers who do not follow the
Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting one or more of the project
maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
This Code of Conduct is adapted from the
[Contributor Covenant](http://contributor-covenant.org), version 1.0.0,
available at
[http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
49 changes: 27 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contributing

_postcss-cssnext uses a lot of [postcss](https://github.com/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._
_postcss-cssnext uses a lot of [postcss](https://github.com/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.
Otherwise, fork, work on a branch, install dev-dependencies, respect coding
style & run tests before submitting a bug fix or a feature.

```console
$ git clone https://github.com/YOU/postcss-cssnext.git
Expand All @@ -14,30 +14,35 @@ $ 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
`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

```console
$ 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._
_Be sure to have in your PATH `./node_modules/.bin` so you can use local module
directly in console._

## Details

### Add a feature

1. Add test files (input + expected output) in [`src/__tests__/fixtures/features`](src/__tests__/features)

- Choose a pretty simple and clear name (that match the specs), if you are not sure, ask using an issue.
- Add the feature in :
- `docs/content/index.md` (http://cssnext.io/)
- `docs/content/features.md` (http://cssnext.io/features/) with an example + link to specs like others features
- Add the dependency in the [`package.json`](package.json) (use `npm install --save postcss-...`)
- Add the feature in the source (in [`src/features.js`](src/features.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 in the function you just created
- Run test and be happy
- Add feature on [the playground](docs/content/playground.html) example
1. Add test files (input + expected output) in
[`src/__tests__/fixtures/features`](src/__tests__/features)

* Choose a pretty simple and clear name (that match the specs), if you are not
sure, ask using an issue.
* Add the feature in :
* `docs/content/index.md` (http://cssnext.io/)
* `docs/content/features.md` (http://cssnext.io/features/) with an example +
link to specs like others features
* Add the dependency in the [`package.json`](package.json) (use
`npm install --save postcss-...`)
* Add the feature in the source (in [`src/features.js`](src/features.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 in the function you just created
* Run test and be happy
* Add feature on [the playground](docs/content/playground.html) example
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
[![Version](https://img.shields.io/npm/v/postcss-cssnext.svg)](https://github.com/MoOx/postcss-cssnext/blob/master/CHANGELOG.md)
[![Support on gitter chat](https://img.shields.io/badge/support-gitter%20chat-E40255.svg)](https://gitter.im/MoOx/postcss-cssnext)


> PostCSS plugin to use tomorrow’s CSS syntax, today.
PostCSS-cssnext is a PostCSS plugin that helps you to use the latest CSS syntax today.
It transforms CSS specs into more compatible CSS so you don’t need to wait for browser support.
PostCSS-cssnext is a PostCSS plugin that helps you to use the latest CSS syntax
today. It transforms CSS specs into more compatible CSS so you don’t need to
wait for browser support.

---

## [Documentation](http://cssnext.io/)

- [Features](http://cssnext.io/features/)
- [Setup](http://cssnext.io/setup/)
- [Usage](http://cssnext.io/usage/)
- [Playground](http://cssnext.io/playground/)
- [Migration to postcss-cssnext](http://cssnext.io/postcss/)
* [Features](http://cssnext.io/features/)
* [Setup](http://cssnext.io/setup/)
* [Usage](http://cssnext.io/usage/)
* [Playground](http://cssnext.io/playground/)
* [Migration to postcss-cssnext](http://cssnext.io/postcss/)

For questions and support please visit the
[support chat](https://gitter.im/MoOx/postcss-cssnext).
Expand Down
44 changes: 22 additions & 22 deletions build.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
const assign = require("object-assign")
const assign = require("object-assign");

const dev = process.argv.indexOf("--dev") > -1
const devServer = process.argv.indexOf("--dev-server") > -1
const production = process.argv.indexOf("--production") > -1
const dev = process.argv.indexOf("--dev") > -1;
const devServer = process.argv.indexOf("--dev-server") > -1;
const production = process.argv.indexOf("--production") > -1;

const config = assign(
{
__DEV__: dev,
__DEV_SERVER__: devServer,
__PROD__: production,
__SERVER_PROTOCOL__: "http://",
__SERVER_PROTOCOL__: "http://"
},
(
production
production
? {
"process.env": {
NODE_ENV: JSON.stringify("production"),
},
__SERVER_HOSTNAME__: "cssnext.io",
__SERVER_HOST__: "cssnext.io",
}
"process.env": {
NODE_ENV: JSON.stringify("production")
},
__SERVER_HOSTNAME__: "cssnext.io",
__SERVER_HOST__: "cssnext.io"
}
: {
__SERVER_HOSTNAME__: "0.0.0.0",
__SERVER_PORT__: 1985,
__SERVER_HOST__: "0.0.0.0:1985",
__LR_SERVER_PORT__: 1986,
}
)
)
__SERVER_HOSTNAME__: "0.0.0.0",
__SERVER_PORT__: 1985,
__SERVER_HOST__: "0.0.0.0:1985",
__LR_SERVER_PORT__: 1986
}
);

config.__SERVER_URL__ = `${config.__SERVER_PROTOCOL__}${config.__SERVER_HOST__}`
config.__SERVER_URL__ = `${config.__SERVER_PROTOCOL__}${
config.__SERVER_HOST__
}`;

module.exports = config
module.exports = config;
Loading

0 comments on commit 6201bae

Please sign in to comment.