Add JS build process
This commit is contained in:
32
README.md
32
README.md
@@ -5,6 +5,7 @@ A modern Wordpress theme written for [WindyCOYS.com](http://windycoys.com).
|
||||
Built using:
|
||||
|
||||
* [PostCSS](https://postcss.org)
|
||||
* [Rollup.js](https://rollupjs.org) & [Babel](https://babeljs.io/)
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -13,14 +14,13 @@ Built using:
|
||||
|
||||
## Building
|
||||
|
||||
At the moment, the only step of the build process is to compile `styles.css`,
|
||||
this is done by running:
|
||||
The CSS and JavaScript is built with the following command:
|
||||
|
||||
```
|
||||
npm run css:compile
|
||||
npm run build
|
||||
```
|
||||
|
||||
*Note: CSS will only be minified if NODE_ENV='production'*
|
||||
*Note: Files will only be minified if NODE_ENV='production'*
|
||||
|
||||
## Developing
|
||||
|
||||
@@ -36,6 +36,30 @@ To build and watch the theme files for changes, run:
|
||||
npm start
|
||||
```
|
||||
|
||||
*Note: You will either need to set up a host file entry to point
|
||||
`windycoys.local` to the container's IP or update `.browser-sync.json` to the
|
||||
container's IP*
|
||||
|
||||
## Linting
|
||||
|
||||
### CSS
|
||||
|
||||
CSS is linted with [stylelint](https://stylelint.io) using
|
||||
[stylelint-selector-bem-pattern](https://github.com/simonsmith/stylelint-selector-bem-pattern)
|
||||
|
||||
```
|
||||
npm run css:lint
|
||||
```
|
||||
|
||||
### JavaScript
|
||||
|
||||
JavaScript is linted with [eslint](https://eslint.org/) using
|
||||
[Airbnb's base config](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base)
|
||||
|
||||
```
|
||||
npm run js:lint
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
The WindyCOYS theme is licensed under the [MIT license](http://opensource.org/licenses/MIT)
|
||||
|
||||
Reference in New Issue
Block a user