This is the repo for the Angular 2 workshop @omegapoint.
In order to install and run the application you need Node and NPM installed.
The project uses jspm and systemJS, jspm is a package/build manager and
systemJS is a module loader for ES6/TypeScript.
- Node: >= 4.x
- Npm: >= 2.x
- Browser with decent devtools, chrome is recommended. (this setup has been tested with chrome and safari)
npm run setupThe setup script downloads dependencies and configures systemJS mappings. We can now start the application by running:
npm startThis starts a simple web server with chokidar-socket-emitter enabled, the emitter will emit events every time a file is changed, deleted or added.
Index.html contains a script which configures systemjs-hot-reloader, the reloader will reload the angular components when needed.
The project is configured with the karma test runner and karma-uiuxengineering-jspm, which adds jspm support to karma.
Tests are added to the test runner if a file ends with spec.ts.
Run the following command:
npm test
JSPM is also used to build the application, the build script applies
tree-shaking with rollup.js and produces a js file in UMD format.
Build the application by running:
npm run build
The script creates a build directory containing a index.html with no
dependencies to systemJS, ES6 or TypeScript.
If you install the npm package http-server globally you can start up the application in the build directory by running:
http-server -p {portnumber} -o