All files for production are compiled with Grunt. CSS compiled with PostCSS. Images and HTML just copied.
-
Install Node.js.
-
Install Grunt CLI:
$ npm install -g grunt-cli
-
Install development modules:
$ npm install
-
Run
grunt build
.
root
— configs and dependencies.
build
— destination directory. There would be generated assets. Shouldn't be in repository.
dev
— source directory for everything:
- dev root — HTML.
img
— images.pcss
— PostCSS files.
Start watching service which generates dev version on each source file change, also this start local webserver with autoreload:
$ grunt
Generate production (minified and optimized) version:
$ grunt build
test — check JavaScript code style in scripts.js and Gruntfile.js.
deploy — build website and upload to the GitHub Pages.