Angular Express boilerplate to start a Bootstrap only website without AngularJS.
Features:
- automatic compilation of ES6 with Babel
- pre-configured package management using jspm
- dynamic module loading using the SystemJS dynamic ES6 loader
- pre-configured unit testing with karma, mocha, chai and PhantomJS
- powerful built-in server based on Express 4 and Harp with preprocessor support for Jade, Markdown, EJS, Coffeescript, Sass, LESS and Stylus.
- compile to HTML, CSS & JavaScript and host it anywhere
- customizable Bootstrap CSS framework
Ensure the Angular Express CLI tool is installed:
$ npm install -g ngx-cliCreate a new project directory:
$ mkdir project
$ cd projectInitialize the boilerplate:
$ ngx init -b bootstrap-onlyInstall third-party dependencies:
$ jspm install
$ npm installFinally start the Angular Express server:
$ npm startand navigate to: <ip>:9000 in the browser.
The configuration is stored in configuration files in the /config directory.
It can be overriden and extended using the node-config rules:
# Default configuration
/config/default.js
# Production configuration
/config/production.js
# Local configuration
/config/local.jsSee configuration files for more information.
Start the server:
# Uses NODE_ENV of your environment
$ npm startStart the server in development mode:
# Uses NODE_ENV=development
$ npm run development-serverStart the server in production mode:
# Update src/build.js
$ npm run build
# Start production server
# Uses NODE_ENV=production
$ npm run production-serverFrom the root of the project, run:
$ npm run compileto compile static HTML, CSS and JavaScript in dist.
Ensure you have BrowserSync installed:
$ npm install -g browser-syncFrom the root of the project, run:
$ browser-sync start --proxy localhost:9000 --files "src/**/*"and navigate your browser to the BrowserSync url:
--------------------------------------
Local: http://localhost:3000
--------------------------------------
UI: http://localhost:3001
--------------------------------------Make sure the Karma CLI is installed:
$ npm install -g karma-cliTo run the tests:
$ karma start- Initial version
