Skip to content
denbeuteld edited this page Nov 20, 2022 · 4 revisions

For building EaselJS, we use a custom build script written in node.js. It uses the following libraries:

Google Closure requires that Java is installed on the system.

YUI Doc requires that Python is installed on your system, along with the following modules:

  • setuptools
  • Pygments
  • SimpleJSON
  • Cheetah

View the YUI Doc page for more information.

YUI Doc and Google Closure are included in the EaselJS repository, which makes it easier to run the build, and ensures that we don’t have version mismatches between the source and the libraries.

Configuration

In order to run the script, you must have node.js installed, along with the wrench and optimist modules.

The easiest way to install the required modules is to first install NPM (node package manager) and then run:

npm install wrench
npm install optimist

Building the Source

Build Task Manager for EaselJS
Usage
node ./build.js [-v] [-h] [-l] --tasks=TASK [--version=DOC_VERSION] [--source=FILE] [--output=FILENAME.js]

Options:
  -v, --verbose  Enable verbose output                                                                              [boolean]
  -l, --list     List all available tasks                                                                           [boolean]
  -h, --help     Display usage                                                                                      [boolean]
  --version      Document build version number                                                                      [string]
  --tasks        Task to run                                                                                        [default: "all"]
  -s, --source   Include specified file in compilation. Option can be specified multiple times for multiple files.
  -o, --output   Name of minified JavaScript file.                                                                  [default: "easel.js"]

Examples

Build Source and Docs

./build.js --tasks=ALL --version=5

Build Source

./build.js --tasks=BUILDSOURCE

Build Docs

./build.js --tasks=BUILDDOCS --version=5

Build Source and include external .js files and rename generated file

./build.js --tasks=BUILDSOURCE -s test.js -s test2.js -o mylib.js

Clean Build Directories

./build.js --tasks=CLEAN

Tagging the Release

When a release is ready to tag, use the following git command:

git tag -a release_v0.3.0
git push --tags

There is a good reference on tagging at

https://git-scm.com/book/en/v2/Git-Basics-Tagging