angular2-library-starter v0.0.6
Angular2 Library Starter
A basic starter library that features Angular 2 with ES6 and a Demo with Express/Node. Has fully integrated unit and e2e tests.
Huge Kudos goes to the Angular2 Webpack Starter for being a great example!
Quick Start
# Clone the repo
git clone https://github.com/jgodi/angular2-library-starter.git
# CD into the project
cd angular2-library-starter
# Install all required dependencies
npm install
# Start the server
npm startNow, navigate to http://localhost:3000 in your browser and code!
Testing
Unit Testing w/ Karma
# Run unit tests
npm testWill run all karma unit tests. Coverage will be reported in /coverage.
E2E Testing w/ Protractor
Make sure to install the webdriver before hand using npm run webdriver-update.
# Start the application in one command prompt
npm start
# Finally, run the e2e test in a third command prompt
npm run protractorBuilding / Developing
Building this application is easy, there are a few commands to make it very easy. It uses the index.html file that is located in public as a base template and outputs a build version of it into server/views/index.html to be served up via node.
Running Demo / See Changes
To run the demo and see the changes as you update the lib/, you will need to run the following:
# Run the compile watch to compile code as it changes (terminal 1)
npm run compile:watch
# Run the demo (terminal 2)
npm startDeveloping Locally
NPM Link the project via:
npm link
# CD into project to consume
cd ../project
# Link
npm link angular2-library-starterNOTE You will need to compile the code as things change
# Watch/compile as file change
npm run compile:watch