A seed project for Angular
-
Install Homebrew (optional, but highly recommended).
-
Install Node.js (these days, Node comes with NPM) and PhantomJS. Assuming you have Homebrew installed:
brew install node phantomjs
-
Install Ruby (> 2.0) and Bundler. Mac OS comes with Ruby 2.0 these days, which is fine. Otherwise think about using rbenv to manage Ruby versions. If you do stick with the built-in Ruby in Mac OS, keep in mind that you need to be root to install gems.
-
Install gulp and bower. Gulp is the build system we're using. Bower is a package manager for front-end libraries.
npm install -g gulp bower
-
Install the rest of the prerequisites using their various dependency management systems:
We have two kinds of dependencies in this project: tools and angular framework code. The tools help us manage and test the application.
- We get the tools we depend upon via
npm
, the [node package manager][npm]. - We get the angular code via
bower
, a [client-side code package manager][bower].
Note: you might need to be root to run bundle install
on your system
npm install
bower install
-
Create a new app:
gulp template/app
-
Create a page for your new app
gulp template/page
-
Run the full test suite:
gulp test
-
Run the development server and unit tests:
gulp
-
Visit your new page:
Deployment to an S3 bucket is done in one command. You only need to specify the destination bucket and the desired config file to use
gulp deploy --bucket my-bucket-name.mutuallyhuman.com --config staging
AWS credentials are read from ~/.aws/credentials
.
Make sure to return this
from your controller definitions, so that Angular doesn't think you're returning a factory.
The unit tests run vanilla Jasmine, currently version 2.1.
The e2e tests run minijasminenode, and specifically they run a version which only supports Jasmine 1.x syntax.