Skip to content

How to build

Martin Treacy-Schwartz edited this page Mar 23, 2017 · 12 revisions

ℹ️
You only need to read this page is your are interested in modifying and building the SDK from Typescript source. If you aren't you can skip this page.

Dependencies

  • Node.js
  • Gulp

Run the following command to install all devDependencies:

npm install

All source code (Typescript) is located in src and resulting distribution files from building are placed in dist.

To build run:

gulp

This will build GameAnalytics.d.ts (declaration file), GameAnalytics.debug.js (includes sourcemap, not uglified), GameAnalytics.js (logging included, uglified, around 60Kb in size) and GameAnalytics.min.js (no logging included, uglified, around 48Kb in size).

Alternatively you can just build one of the targets by running one of these commands:

gulp normal
gulp debug
gulp mini
gulp declaration

No logging included

If you want to build the mini-release without logging included to save on the build size you can add the --nologging argument:

gulp mini --nologging

Testing

To run the test, run:

gulp test

 

NEXT  →