ZPT-JS tutorial - Building and testing

Starting ZPT-JS

Asumming you have downloaded ZPT-JS before, move to the directory of ZPT-JS and use the next command to install the dependencies of ZPT-JS and build dist files:

$ npm run init
                

That command runs a npm install (install all dependencies) and npm run build-all (build dist files).

Then use the next command to initialize a HTTP server (port 9000) to serve static files (HTML, CSS, JS and JSON files):

$ npm run http-server
                

The web of ZPT-JS

Use the next command to initialize a HTTP server (port 9001) to serve static files of the web of ZPT-JS:

$ npm run web
                

Open http://localhost:9001 with your favourite browser to view the web of ZPT-JS.

Run the next command to initialize both HTTP servers:

$ npm run start
                

Testing

ZPT-JS uses QUnit as testing framework.

Open http://localhost:9000/test/ with your favourite browser. Be careful: only related to browser test are run! All tests passed using last versions of Mozilla Firefox and Chromium. Perhaps some tests fail using other browsers!

Other scripts

Description of other scripts defined in package.json file: