This is a project template for Angular 1 and Angular 2 applications using Lineman. It dependes on the lineman-angular and https://github.com/RodrigoMattosoSilveira/lineman-angular2 plugins.
It was built based on lineman-angular-template, enabling you to build pure Angular 1, hybrid Angular 1/ Angular 2, and pure Angular 2 applications.
Angular 2 is quite different from Angular 2, with some of these differences having a direct impact on how hybrid Angular 1/ Angular 2, and pure Angular 2 applications are built:
- TypeScript: Angular 2 introduced support for one additional language, TypeScript. This plugin adds support for TypeScript transpilation.
- Module Management - Angular 2 adopted the ES6 module architecture, introducing a third party module manager - this plugin uses SystemJS, leading to changes in how files are managed during development and at runtime. As a result it became necessary to carefully re-factor the configuration to support the development of hybrid Angular 1/ Angular 2, and pure Angular 2 applications while still fully preserving the Angular 1 support.
- Component Architecture - Angular 2 introduces a more sophisticated component architecture, offering the developer the ability to consolidate all of a component’s artifacts - css / html / img, png, ts, into the same filesystem folder, leaving it up to the module manager to worry about loading them as necessary. As a result it became necessary to carefully re-factor the configuration to support this paradigm while still supporting Angular 1 fully.
git clone https://github.com/RodrigoMattosoSilveira/lineman-angular2-template.git my-angular-app
cd my-angular-app
sudo npm install -g lineman
npm install
lineman run
- open your web browser to localhost:8000
This template was used as the basis of @davemo's Testing Strategies for Angular JS screencast, and contains all the tests we wrote in the screencast and a few more!
To run the unit tests:
lineman run
from 1 terminal windowlineman spec
from another terminal window, this will launch Testem and execute specs in Chrome
To run the end-to-end tests:
npm install protractor
./node_modules/protractor/bin/webdriver-manager update
- Make sure you have chrome installed.
lineman run
from 1 terminal windowlineman grunt spec-e2e
from another terminal window