Perform the following steps to get set up with a bare-bones AngularJS (ng-forward) web app. The build system uses SystemJS, JSPM, and Gulp.
cdto the root of your clone of this repository- Install Node.js and NPM
- Run
$ npm install -g gulp jspm typings http-server
- Run
$ npm installto acquire Gulp and build system dependencies - Run
$ jspm installto acquire webapp and transpilation dependencies - Run
$ typings installto acquire TypeScript definitions
- Run
$ gulp prodto create and configure a production JavaScript/HTML/CSS bundle from the project's source TypeScript/HTML/Sass files. You can find this bundled file instatic/build/main.js.
- Run
http-server. Keep this terminal open. - Browse to
localhost:8080to see your basic Angular app. If the message "2 + 2 = 4" displays correctly, you should be good to go. (Note that the port in the address can change, so use the one thathttp-serveroutputs on startup if it is not 8080.)
Switch to development (unbundled) mode by running $ gulp dev. TypeScript & Sass source files will be transpiled on the fly in-browser by SystemJS, so you can make changes and see them reflected by refreshing your browser. Be sure to re-run $ gulp prod before pushing to any production environments.