Skip to content

Latest commit

 

History

History
82 lines (49 loc) · 3.1 KB

README.textile

File metadata and controls

82 lines (49 loc) · 3.1 KB

For building the compiled library and API documentation, 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 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
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: (set in config properties)]

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

http://book.git-scm.com/3_git_tag.html