This is a project template for Angular JS applications using Lineman.
It includes the following features:
grunt-angular-templates
config/server.js
home
and login
home
and login
, with $scope variables set and boundgit clone https://github.com/linemanjs/lineman-angular-template.git my-lineman-app
cd my-lineman-app
sudo npm install -g lineman
npm install
lineman run
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 ChromeTo run the end-to-end tests:
npm install protractor
./node_modules/protractor/bin/webdriver-manager update
lineman run
from 1 terminal windowlineman grunt spec-e2e
from another terminal windowIf you are using Coffeescript to define the angular.module for your app, you will need to swap the concat order in config/application.js
such that coffeescript files are included before javascript. (If you are using JavaScript for defining the angular.module the default concat order is fine).
Add the following concat_sourcemap
block to config/application.js
if you want to define your app module in coffeescript:
module.exports = function(lineman) {
return {
concat_sourcemap: {
js: {
src: [
"<%= files.js.vendor %>",
"<%= files.coffee.generated %>",
"<%= files.js.app %>",
"<%= files.ngtemplates.dest %>"
]
}
}
};
};
Hopefully this helps you get up and running with AngularJS!