From 9fcdac19189ce7eb7a2c345206065fb8c031e4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ch=C3=BDlek?= Date: Thu, 27 Oct 2016 18:30:27 +0200 Subject: [PATCH] Create README.md --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f0f4590 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Usage + +TODO + +# Building + +The build script requires **Python 3**. For automatic build, run `python build.py`, and a `bld` folder with the track script and renderer will be created. + +The `track.js` script is ready to be added as a bookmark in a browser, or ran in a browser console. + +## Minification + +The build process has support for JS and CSS minification. + +If possible, it uses **YUI Compressor** for CSS, and **UglifyJS** for JavaScript (falls back to **Google Closure Compiler** if **UglifyJS** is not available). If the required programs are not found on the system path, minification will be disabled without warnings. + +It is possible to disable minification completely using the `--nominify` flag, or to force **Google Closure Compiler** to be used using the `--closure` flag. + +### Requirements + +- **Java 7+** (YUI, Closure Compiler) +- **npm** (UglifyJS) +- **uglify-js-harmony** (UglifyJS) + +### Setting Up UglifyJS + +Once you install `npm`, use the following command to download UglifyJS with ES6 support and add it to your system path: +``` +npm install uglify-js-harmony +``` + +### UglifyJS vs Google Closure Compiler + +Closure Compiler compiles into ES5, which adds support for older browsers that don't have some of the used ES6 functionality, however it is at the expense of several additional kilobytes to the file size.