## Building and Testing Your Copy of MotaJS

### Prerequisites

- Node.js/npm
- git

### Clone repo

Clone a copy of the main MotaJS git repo by running:

`git clone https://github.com/jdmota/MotaJS.git`

### Install dev dependencies

Also make sure that all node modules are installed with `npm install`.

### Custom build

To create a custom build, just run the `custom` script and pass some arguments: the version and the modules to include or exclude.

Example: `npm run custom -- VERSION -view` *this excludes the View module*

The built version of MotaJS will be put in the `dist/VERSION/` subdirectory, along with the minified copy and associated map file.

Instead of excluding the modules you don't want, you can choose which you want to include.

Example: `npm run custom -- VERSION -all +util` *exclude all modules but include the Util module*

Example: `npm run custom -- VERSION -all +util.assign` *exclude all modules but include a specific function from the Util module*

Inclusions and exclusions are applied from left to right.

### Node Testing

Run `npm test`.

### Browser Testing

Run `npm start` and then go to `http://localhost:9009/test/`.
