Starter project with Angularjs Requirejs Bower Grunt and Bootstrap
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
assets
.gitignore
Gruntfile.js
LICENSE
README.md
bower.json
index.html
package.json

README.md

Angular Requirejs Bower Grunt

Starter project with Angularjs Requirejs Bower Grunt and Bootstrap

MIT License Dependencies Badges

Getting started

Fork or Clone this project, rename and run the following to set your environment up. You'll need npm and grunt for this to work.

First install dependencies:

$ npm install -g grunt-cli
$ npm install -g bower
$ npm install
$ bower install

Now just open index.html in your browser and let the magic happen!

Add/Remove Dependencies

We are using bower to handle all the dependencies, to add a new one you can run any of the following:

# registered package
$ bower install jquery
# GitHub shorthand
$ bower install desandro/masonry
# Git endpoint
$ bower install git://github.com/user/package.git
# URL
$ bower install http://example.com/script.js

Once you are done, you need to update the routes in Requirejs for them to be available. Don't worry though, Grunt will do that for you, on the default task. Just run:

$ grunt

Building

To test locally you develop the Angularjs app inside app/ and the run index.html in your browser.

Once you have something good going you can build it automatically with grunt:

$ grunt build

Behind the scenes grunt will:

  1. Delete the build/ folder
  2. Minify and concatenate the app using Requirejs' optimizer
  3. Point the Requirejs script in index.html to the built file
  4. Copy the assets/ folder and bootstrap to the build folder

To test open build/index.html in your browser.

Deploying

At the moment the sample is configured to deploy itself to Github Pages, to deploy simply run:

$ grunt deploy

Other sites like heroku, openshift, or virtually anything could be easily configured, if you do so please send a pull request.

Contributing/Roadmap

Some pending tasks/ideas I have for this sample app are:

  • Multiple deploy options exposed as $ grunt deploy <service>
  • Functional Angularjs app with several views, providers...
  • Non bootstrap option
  • Make this into a Yeoman generator
  • Add tests?

Meta

Developed by Alejandro U. Alvarez - MIT License

Analytics