You can use it to quickly bootstrap your angular webapp projects and dev environment for these
projects.
-The seed contains angular libraries, test libraries and a bunch of scripts all preconfigured for
+The seed contains AngularJS libraries, test libraries and a bunch of scripts all preconfigured for
instant web development gratification. Just clone the repo (or download the zip/tarball), start up
our (or yours) webserver and you are ready to develop and test your application.
the general rule is that all you need in production are all the files under the `app/` directory.
Everything else should be omitted.
-angular apps are really just a bunch of static html, css and js files that just need to be hosted
+Angular apps are really just a bunch of static html, css and js files that just need to be hosted
somewhere, where they can be accessed by browsers.
-If your angular app is talking to the backend server via xhr or other means, you need to figure
+If your Angular app is talking to the backend server via xhr or other means, you need to figure
out what is the best way to host the static files to comply with the same origin policy if
applicable. Usually this is done by hosting the files by the backend server or through
reverse-proxying the backend server(s) and a webserver(s).
### Running unit tests
We recommend using [jasmine](http://pivotal.github.com/jasmine/) and
-[JsTestDriver](http://code.google.com/p/js-test-driver/) for your unit tests/specs, but you are free
+[Testacular](http://vojtajina.github.com/testacular/) for your unit tests/specs, but you are free
to use whatever works for you.
-Requires java and a local or remote browser.
+Requires [node.js](http://nodejs.org/), Testacular (`sudo npm install -g testacular`) and a local
+or remote browser.
-* start `scripts/test-server.sh` (on windows: `scripts\test-server.bat`)
-* navigate your browser to `http://localhost:9876/`
-* click on one of the capture links (preferably the "strict" one)
-* run `scripts/test.sh` (on windows: `scripts\test.bat`)
-
-
-### Continuous unit testing
-
-Requires ruby and [watchr](https://github.com/mynyml/watchr) gem.
-
-* start JSTD server and capture a browser as described above
-* start watchr with `watchr scripts/watchr.rb`
-* in a different window/tab/editor `tail -f logs/jstd.log`
-* edit files in `app/` or `src/` and save them
-* watch the log to see updates
-
-There are many other ways to achieve the same effect. Feel free to use them if you prefer them over
-watchr.
+* start `scripts/test.sh` (on windows: `scripts\test.bat`)
+ * a browser will start and connect to the Testacular server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the `config/testacular.conf.js` file)
+* to run or re-run tests just change any of your source or test javascript files
### End to end testing
-angular ships with a baked-in end-to-end test runner that understands angular, your app and allows
+Angular ships with a baked-in end-to-end test runner that understands angular, your app and allows
you to write your tests with jasmine-like BDD syntax.
-Requires a webserver, node.js or your backend server that hosts the angular static files.
+Requires a webserver, node.js + `./scripts/web-server.js` or your backend server that hosts the angular static files.
Check out the
[end-to-end runner's documentation](http://docs.angularjs.org/guide/dev_guide.e2e-testing) for more
app.css --> default stylesheet
img/ --> image files
index.html --> app layout file (the main html template file of the app)
+ index-async.html --> just like index.html, but loads js files asynchronously
js/ --> javascript files
+ app.js --> application
controllers.js --> application controllers
+ directives.js --> application directives
filters.js --> custom angular filters
services.js --> custom angular services
- widgets.js --> custom angular widgets
lib/ --> angular and 3rd party javascript libraries
angular/
- angular.js --> the latest angular js
- angular.min.js --> the latest minified angular js
- angular-*.js --> angular add-on modules
- version.txt --> version number
- partials/ --> angular view partials (partial html templates)
+ angular.js --> the latest angular js
+ angular.min.js --> the latest minified angular js
+ angular-*.js --> angular add-on modules
+ version.txt --> version number
+ partials/ --> angular view partials (partial html templates)
partial1.html
partial2.html
- config/jsTestDriver.conf --> config file for JsTestDriver
-
- logs/ --> JSTD and other logs go here (git-ignored)
+ config/testacular.conf.js --> config file for running unit tests with Testacular
+ config/testacular-e2e.conf.js --> config file for running e2e tests with Testacular
scripts/ --> handy shell/js/ruby scripts
e2e-test.sh --> runs end-to-end tests with Testacular (*nix)
e2e-test.bat --> runs end-to-end tests with Testacular (windows)
- test-server.bat --> starts JSTD server (windows)
- test-server.sh --> starts JSTD server (*nix)
- test.bat --> runs all unit tests (windows)
- test.sh --> runs all unit tests (*nix)
- watchr.rb --> config script for continuous testing with watchr
+ test.bat --> autotests unit tests with Testacular (windows)
+ test.sh --> autotests unit tests with Testacular (*nix)
web-server.js --> simple development webserver based on node.js
test/ --> test source files and libraries
angular-mocks.js --> mocks that replace certain angular services in tests
angular-scenario.js --> angular's scenario (end-to-end) test runner library
version.txt --> version file
- jasmine/ --> Pivotal's Jasmine - an elegant BDD-style testing framework
- jasmine-jstd-adapter/ --> bridge between JSTD and Jasmine
- jstestdriver/ --> JSTD - JavaScript test runner
unit/ --> unit level specs/tests
controllersSpec.js --> specs for controllers
+ directivessSpec.js --> specs for directives
+ filtersSpec.js --> specs for filters
+ servicesSpec.js --> specs for services
## Contact
-For more information on angular please check out http://angularjs.org/
+For more information on AngularJS please check out http://angularjs.org/