A starter project for AngularJS using Brunch.io
- Coffeescript / Jade / SASS / SCSS automatically compiled on save
- HTML5BP, Modernizr, and all the goodness of initializr
- Compass-Twitter-Bootstrap integration
- auto-reload during development saves you from manually refreshing the page
- testacular integration for unit tests
- Bootstrap integration with themes.
How to use angular-brunch-true-north
git clone https://github.com/scoarescoare/angular-brunch-true-northto clone the angular-brunch-true-north repository
./scripts/init.shto install node packages
or if you have Brunch installed run:
brunch new myapp --skeleton https://github.com/scoarescoare/angular-brunch-true-north
You will find the jade files in the
app/partials directories. Upon save the Jade files will be compiled to HTML
and placed in the
app/assets folder. Do not modify the files in the
app/assets folder as they will be overriden with subsequent
changes to their
*.jade counter part.
By default angular-brunch-seed uses jade templates. If you would prefer to use HTML run the command:
All Jade file will be compiled to HTML and be placed in the
app/assets directory. Addtionally, the
files will be removed from the project. Any changes that you make to the
app/assets/**/*.html files will now appear in the
Running the app during development
./scripts/server.shto serve using Brunch
Then navigate your browser to http://localhost:3333
NOTE: Occasionally the scripts will not load properly on the initial load. If this occurs, refresh the page. Subsequent refresh will render correctly.
Running the app in production
Please be aware of the caveats regarding Angular JS and minification, take a look at Dependency Injection for information.
Running unit tests
./scripts/test.shto run unit tests with testacular
- Open the browser you would like to test to http://localhost:3334
- Testacular will run tests on save. To insure that changes are
saved be sure to have
./script/development.shrunning in the console.
- If you are on OS X you set the browsers that you would like to target
browser = ["ChromeCanary", "Firefox"]
End to end testing
- run the app in development mode as described above using a separate terminal
./scripts/test-e2e.shto run e2e tests with testacular using angular's scenario runner
Initial load does not render correctly; scripts are not loading.
- Occasionally the scripts will not load properly on the initial load. If this occurs, refresh the page. Subsequent refresh will render correctly.
- EMFILE means there are too many open files. Brunch watches all your project files and it's usually a pretty big number. You can fix this error with setting max opened file count to bigger number with command ulimit -n (10000 should be enough).
The compelete Brunch FAQ
Receiving updates from upstream
When we upgrade angular-seed's repo with newer angular or testing library code, you can just fetch the changes and merge them into your project with git.
git pull origin master
For more information on angular please check out http://angularjs.org