STM Build Tool
This is a simple project to test a home-made build tool.
Installation
Dependencies
- node.js
- npm
- Further dependencies listed in the
package.json
file
Instructions
- Download .zip, clone or fork from Source.
- Installing dependencies
- First time:
npm run boot && npm run install
- Subsequent uses:
npm run install
npm start
to kick the whole thing off
Usage
Controls
npm run watch
- Watches
_dev/_style.scss
and compiles to _dev/style.min.css
- Watches
_dev/
for any changes and live-reloads the browser
npm run test
- Validates JavaScript. Errors in terminal.
- Validates PHP. Errors in terminal.
npm run build
- Creates an empty project folder
_www/
- Compiles SCSS into CSS
- Minifies CSS, JS, and HTML/PHP^
- Copies minified CSS and JS into project folder
- Copies
assets
and vendor
folders verbatim into project folder
- Copies
index.php
into project folder
npm run $script$
- various steps of the
build
script can be run individually. See package.json
for the full list.
Next Steps
- More test suites;
- css? - csslint unknown error. Removed from build until solution found.
- html?
Footnotes
^ Currently minifies specific folder - _dev/assets/pages
as html-minifier throws a fit if you try to minify images.