Permalink
Browse files

chore(dependencies): remove inline dependencies (use npm & bower inst…

…ead)

It is inefficient to store the angular libraries inside this repository.
Moreover it is a pain to have to update them every time a new version of
Angular is released.

This commit changes the project to use bower to install the angular
dependencies.

In addition, simplify the structure of the project, all the support
scripts have either been replaced with well-defined npm modules (e.g
http-server) or have been moved to the package.json `script` property.

This means that we can now do all the management of the project with
three simple commands:

* `npm start` - start the development web server to host the application
* `npm test` - start the Karma test runner
* `npm run-script protractor` - start the Protractor end-to-end test runner

A nice feature of these scripts is that they run `npm install` first, thus
ensuring that the necessary npm dependencies are in place.  Also there is
a `postinstall` script which runs `bower install` to ensure the angular
library dependencies are in place and updates the index-async.html
with the `angular-loader.min.js` content via the following sed script:

```
sed '/@@NG_LOADER@@/{
  s/@@NG_LOADER@@//g
  r bower_components/angular-loader/angular-loader.min.js
}' app/index-async.html.template > app/index-async.html
```
  • Loading branch information...
1 parent f84c292 commit 5d2baf8a4045df2043a72f06f981c37c9bc0ce97 @petebacondarwin petebacondarwin committed Mar 25, 2014
Showing with 194 additions and 84,385 deletions.
  1. +1 −0 .gitignore
  2. +139 −52 README.md
  3. +2 −2 app/index-async.html
  4. +2 −2 app/index-async.html.template
  5. +2 −2 app/index.html
  6. +0 −1,613 app/lib/angular/angular-animate.js
  7. +0 −27 app/lib/angular/angular-animate.min.js
  8. +0 −8 app/lib/angular/angular-animate.min.js.map
  9. +0 −196 app/lib/angular/angular-cookies.js
  10. +0 −8 app/lib/angular/angular-cookies.min.js
  11. +0 −8 app/lib/angular/angular-cookies.min.js.map
  12. +0 −18 app/lib/angular/angular-csp.css
  13. +0 −412 app/lib/angular/angular-loader.js
  14. +0 −9 app/lib/angular/angular-loader.min.js
  15. +0 −8 app/lib/angular/angular-loader.min.js.map
  16. +0 −607 app/lib/angular/angular-resource.js
  17. +0 −13 app/lib/angular/angular-resource.min.js
  18. +0 −8 app/lib/angular/angular-resource.min.js.map
  19. +0 −927 app/lib/angular/angular-route.js
  20. +0 −14 app/lib/angular/angular-route.min.js
  21. +0 −8 app/lib/angular/angular-route.min.js.map
  22. +0 −624 app/lib/angular/angular-sanitize.js
  23. +0 −14 app/lib/angular/angular-sanitize.min.js
  24. +0 −8 app/lib/angular/angular-sanitize.min.js.map
  25. +0 −33,168 app/lib/angular/angular-scenario.js
  26. +0 −575 app/lib/angular/angular-touch.js
  27. +0 −13 app/lib/angular/angular-touch.min.js
  28. +0 −8 app/lib/angular/angular-touch.min.js.map
  29. +0 −21,168 app/lib/angular/angular.js
  30. +0 −207 app/lib/angular/angular.min.js
  31. BIN app/lib/angular/angular.min.js.gzip
  32. +0 −8 app/lib/angular/angular.min.js.map
  33. +0 −1 app/lib/angular/errors.json
  34. +0 −99 app/lib/angular/i18n/angular-locale_af-na.js
  35. +0 −99 app/lib/angular/i18n/angular-locale_af-za.js
  36. +0 −99 app/lib/angular/i18n/angular-locale_af.js
  37. +0 −99 app/lib/angular/i18n/angular-locale_am-et.js
  38. +0 −99 app/lib/angular/i18n/angular-locale_am.js
  39. +0 −99 app/lib/angular/i18n/angular-locale_ar-001.js
  40. +0 −99 app/lib/angular/i18n/angular-locale_ar-ae.js
  41. +0 −99 app/lib/angular/i18n/angular-locale_ar-bh.js
  42. +0 −99 app/lib/angular/i18n/angular-locale_ar-dz.js
  43. +0 −99 app/lib/angular/i18n/angular-locale_ar-eg.js
  44. +0 −99 app/lib/angular/i18n/angular-locale_ar-iq.js
  45. +0 −99 app/lib/angular/i18n/angular-locale_ar-jo.js
  46. +0 −99 app/lib/angular/i18n/angular-locale_ar-kw.js
  47. +0 −99 app/lib/angular/i18n/angular-locale_ar-lb.js
  48. +0 −99 app/lib/angular/i18n/angular-locale_ar-ly.js
  49. +0 −99 app/lib/angular/i18n/angular-locale_ar-ma.js
  50. +0 −99 app/lib/angular/i18n/angular-locale_ar-om.js
  51. +0 −99 app/lib/angular/i18n/angular-locale_ar-qa.js
  52. +0 −99 app/lib/angular/i18n/angular-locale_ar-sa.js
  53. +0 −99 app/lib/angular/i18n/angular-locale_ar-sd.js
  54. +0 −99 app/lib/angular/i18n/angular-locale_ar-sy.js
  55. +0 −99 app/lib/angular/i18n/angular-locale_ar-tn.js
  56. +0 −99 app/lib/angular/i18n/angular-locale_ar-ye.js
  57. +0 −99 app/lib/angular/i18n/angular-locale_ar.js
  58. +0 −99 app/lib/angular/i18n/angular-locale_bg-bg.js
  59. +0 −99 app/lib/angular/i18n/angular-locale_bg.js
  60. +0 −99 app/lib/angular/i18n/angular-locale_bn-bd.js
  61. +0 −99 app/lib/angular/i18n/angular-locale_bn-in.js
  62. +0 −99 app/lib/angular/i18n/angular-locale_bn.js
  63. +0 −99 app/lib/angular/i18n/angular-locale_ca-ad.js
  64. +0 −99 app/lib/angular/i18n/angular-locale_ca-es.js
  65. +0 −99 app/lib/angular/i18n/angular-locale_ca.js
  66. +0 −99 app/lib/angular/i18n/angular-locale_cs-cz.js
  67. +0 −99 app/lib/angular/i18n/angular-locale_cs.js
  68. +0 −99 app/lib/angular/i18n/angular-locale_da-dk.js
  69. +0 −99 app/lib/angular/i18n/angular-locale_da.js
  70. +0 −99 app/lib/angular/i18n/angular-locale_de-at.js
  71. +0 −99 app/lib/angular/i18n/angular-locale_de-be.js
  72. +0 −99 app/lib/angular/i18n/angular-locale_de-ch.js
  73. +0 −99 app/lib/angular/i18n/angular-locale_de-de.js
  74. +0 −99 app/lib/angular/i18n/angular-locale_de-li.js
  75. +0 −99 app/lib/angular/i18n/angular-locale_de-lu.js
  76. +0 −99 app/lib/angular/i18n/angular-locale_de.js
  77. +0 −99 app/lib/angular/i18n/angular-locale_el-cy.js
  78. +0 −99 app/lib/angular/i18n/angular-locale_el-gr.js
  79. +0 −99 app/lib/angular/i18n/angular-locale_el.js
  80. +0 −99 app/lib/angular/i18n/angular-locale_en-as.js
  81. +0 −99 app/lib/angular/i18n/angular-locale_en-au.js
  82. +0 −99 app/lib/angular/i18n/angular-locale_en-bb.js
  83. +0 −99 app/lib/angular/i18n/angular-locale_en-be.js
  84. +0 −99 app/lib/angular/i18n/angular-locale_en-bm.js
  85. +0 −99 app/lib/angular/i18n/angular-locale_en-bw.js
  86. +0 −99 app/lib/angular/i18n/angular-locale_en-bz.js
  87. +0 −99 app/lib/angular/i18n/angular-locale_en-ca.js
  88. +0 −99 app/lib/angular/i18n/angular-locale_en-dsrt-us.js
  89. +0 −99 app/lib/angular/i18n/angular-locale_en-dsrt.js
  90. +0 −99 app/lib/angular/i18n/angular-locale_en-fm.js
  91. +0 −99 app/lib/angular/i18n/angular-locale_en-gb.js
  92. +0 −99 app/lib/angular/i18n/angular-locale_en-gu.js
  93. +0 −99 app/lib/angular/i18n/angular-locale_en-gy.js
  94. +0 −99 app/lib/angular/i18n/angular-locale_en-hk.js
  95. +0 −99 app/lib/angular/i18n/angular-locale_en-ie.js
  96. +0 −99 app/lib/angular/i18n/angular-locale_en-in.js
  97. +0 −99 app/lib/angular/i18n/angular-locale_en-iso.js
  98. +0 −99 app/lib/angular/i18n/angular-locale_en-jm.js
  99. +0 −99 app/lib/angular/i18n/angular-locale_en-mh.js
  100. +0 −99 app/lib/angular/i18n/angular-locale_en-mp.js
  101. +0 −99 app/lib/angular/i18n/angular-locale_en-mt.js
  102. +0 −99 app/lib/angular/i18n/angular-locale_en-mu.js
  103. +0 −99 app/lib/angular/i18n/angular-locale_en-na.js
  104. +0 −99 app/lib/angular/i18n/angular-locale_en-nz.js
  105. +0 −99 app/lib/angular/i18n/angular-locale_en-ph.js
  106. +0 −99 app/lib/angular/i18n/angular-locale_en-pk.js
  107. +0 −99 app/lib/angular/i18n/angular-locale_en-pr.js
  108. +0 −99 app/lib/angular/i18n/angular-locale_en-pw.js
  109. +0 −99 app/lib/angular/i18n/angular-locale_en-sg.js
  110. +0 −99 app/lib/angular/i18n/angular-locale_en-tc.js
  111. +0 −99 app/lib/angular/i18n/angular-locale_en-tt.js
  112. +0 −99 app/lib/angular/i18n/angular-locale_en-um.js
  113. +0 −99 app/lib/angular/i18n/angular-locale_en-us.js
  114. +0 −99 app/lib/angular/i18n/angular-locale_en-vg.js
  115. +0 −99 app/lib/angular/i18n/angular-locale_en-vi.js
  116. +0 −99 app/lib/angular/i18n/angular-locale_en-za.js
  117. +0 −99 app/lib/angular/i18n/angular-locale_en-zw.js
  118. +0 −99 app/lib/angular/i18n/angular-locale_en.js
  119. +0 −99 app/lib/angular/i18n/angular-locale_es-419.js
  120. +0 −99 app/lib/angular/i18n/angular-locale_es-ar.js
  121. +0 −99 app/lib/angular/i18n/angular-locale_es-bo.js
  122. +0 −99 app/lib/angular/i18n/angular-locale_es-cl.js
  123. +0 −99 app/lib/angular/i18n/angular-locale_es-co.js
  124. +0 −99 app/lib/angular/i18n/angular-locale_es-cr.js
  125. +0 −99 app/lib/angular/i18n/angular-locale_es-do.js
  126. +0 −99 app/lib/angular/i18n/angular-locale_es-ea.js
  127. +0 −99 app/lib/angular/i18n/angular-locale_es-ec.js
  128. +0 −99 app/lib/angular/i18n/angular-locale_es-es.js
  129. +0 −99 app/lib/angular/i18n/angular-locale_es-gq.js
  130. +0 −99 app/lib/angular/i18n/angular-locale_es-gt.js
  131. +0 −99 app/lib/angular/i18n/angular-locale_es-hn.js
  132. +0 −99 app/lib/angular/i18n/angular-locale_es-ic.js
  133. +0 −99 app/lib/angular/i18n/angular-locale_es-mx.js
  134. +0 −99 app/lib/angular/i18n/angular-locale_es-ni.js
  135. +0 −99 app/lib/angular/i18n/angular-locale_es-pa.js
  136. +0 −99 app/lib/angular/i18n/angular-locale_es-pe.js
  137. +0 −99 app/lib/angular/i18n/angular-locale_es-pr.js
  138. +0 −99 app/lib/angular/i18n/angular-locale_es-py.js
  139. +0 −99 app/lib/angular/i18n/angular-locale_es-sv.js
  140. +0 −99 app/lib/angular/i18n/angular-locale_es-us.js
  141. +0 −99 app/lib/angular/i18n/angular-locale_es-uy.js
  142. +0 −99 app/lib/angular/i18n/angular-locale_es-ve.js
  143. +0 −99 app/lib/angular/i18n/angular-locale_es.js
  144. +0 −99 app/lib/angular/i18n/angular-locale_et-ee.js
  145. +0 −99 app/lib/angular/i18n/angular-locale_et.js
  146. +0 −99 app/lib/angular/i18n/angular-locale_eu-es.js
  147. +0 −99 app/lib/angular/i18n/angular-locale_eu.js
  148. +0 −99 app/lib/angular/i18n/angular-locale_fa-af.js
  149. +0 −99 app/lib/angular/i18n/angular-locale_fa-ir.js
  150. +0 −99 app/lib/angular/i18n/angular-locale_fa.js
  151. +0 −99 app/lib/angular/i18n/angular-locale_fi-fi.js
  152. +0 −99 app/lib/angular/i18n/angular-locale_fi.js
  153. +0 −99 app/lib/angular/i18n/angular-locale_fil-ph.js
  154. +0 −99 app/lib/angular/i18n/angular-locale_fil.js
  155. +0 −99 app/lib/angular/i18n/angular-locale_fr-be.js
  156. +0 −99 app/lib/angular/i18n/angular-locale_fr-bf.js
  157. +0 −99 app/lib/angular/i18n/angular-locale_fr-bi.js
  158. +0 −99 app/lib/angular/i18n/angular-locale_fr-bj.js
  159. +0 −99 app/lib/angular/i18n/angular-locale_fr-bl.js
  160. +0 −99 app/lib/angular/i18n/angular-locale_fr-ca.js
  161. +0 −99 app/lib/angular/i18n/angular-locale_fr-cd.js
  162. +0 −99 app/lib/angular/i18n/angular-locale_fr-cf.js
  163. +0 −99 app/lib/angular/i18n/angular-locale_fr-cg.js
  164. +0 −99 app/lib/angular/i18n/angular-locale_fr-ch.js
  165. +0 −99 app/lib/angular/i18n/angular-locale_fr-ci.js
  166. +0 −99 app/lib/angular/i18n/angular-locale_fr-cm.js
  167. +0 −99 app/lib/angular/i18n/angular-locale_fr-dj.js
  168. +0 −99 app/lib/angular/i18n/angular-locale_fr-fr.js
  169. +0 −99 app/lib/angular/i18n/angular-locale_fr-ga.js
  170. +0 −99 app/lib/angular/i18n/angular-locale_fr-gf.js
  171. +0 −99 app/lib/angular/i18n/angular-locale_fr-gn.js
  172. +0 −99 app/lib/angular/i18n/angular-locale_fr-gp.js
  173. +0 −99 app/lib/angular/i18n/angular-locale_fr-gq.js
  174. +0 −99 app/lib/angular/i18n/angular-locale_fr-km.js
  175. +0 −99 app/lib/angular/i18n/angular-locale_fr-lu.js
  176. +0 −99 app/lib/angular/i18n/angular-locale_fr-mc.js
  177. +0 −99 app/lib/angular/i18n/angular-locale_fr-mf.js
  178. +0 −99 app/lib/angular/i18n/angular-locale_fr-mg.js
  179. +0 −99 app/lib/angular/i18n/angular-locale_fr-ml.js
  180. +0 −99 app/lib/angular/i18n/angular-locale_fr-mq.js
  181. +0 −99 app/lib/angular/i18n/angular-locale_fr-ne.js
  182. +0 −99 app/lib/angular/i18n/angular-locale_fr-re.js
  183. +0 −99 app/lib/angular/i18n/angular-locale_fr-yt.js
  184. +0 −99 app/lib/angular/i18n/angular-locale_fr.js
  185. +0 −99 app/lib/angular/i18n/angular-locale_gl-es.js
  186. +0 −99 app/lib/angular/i18n/angular-locale_gl.js
  187. +0 −99 app/lib/angular/i18n/angular-locale_gsw-ch.js
  188. +0 −99 app/lib/angular/i18n/angular-locale_gsw.js
  189. +0 −99 app/lib/angular/i18n/angular-locale_gu-in.js
  190. +0 −99 app/lib/angular/i18n/angular-locale_gu.js
  191. +0 −99 app/lib/angular/i18n/angular-locale_he-il.js
  192. +0 −99 app/lib/angular/i18n/angular-locale_he.js
  193. +0 −99 app/lib/angular/i18n/angular-locale_hi-in.js
  194. +0 −99 app/lib/angular/i18n/angular-locale_hi.js
  195. +0 −99 app/lib/angular/i18n/angular-locale_hr-hr.js
  196. +0 −99 app/lib/angular/i18n/angular-locale_hr.js
  197. +0 −99 app/lib/angular/i18n/angular-locale_hu-hu.js
  198. +0 −99 app/lib/angular/i18n/angular-locale_hu.js
  199. +0 −99 app/lib/angular/i18n/angular-locale_id-id.js
  200. +0 −99 app/lib/angular/i18n/angular-locale_id.js
  201. +0 −99 app/lib/angular/i18n/angular-locale_in.js
  202. +0 −99 app/lib/angular/i18n/angular-locale_is-is.js
  203. +0 −99 app/lib/angular/i18n/angular-locale_is.js
  204. +0 −99 app/lib/angular/i18n/angular-locale_it-it.js
  205. +0 −99 app/lib/angular/i18n/angular-locale_it-sm.js
  206. +0 −99 app/lib/angular/i18n/angular-locale_it.js
  207. +0 −99 app/lib/angular/i18n/angular-locale_iw.js
  208. +0 −99 app/lib/angular/i18n/angular-locale_ja-jp.js
  209. +0 −99 app/lib/angular/i18n/angular-locale_ja.js
  210. +0 −99 app/lib/angular/i18n/angular-locale_kn-in.js
  211. +0 −99 app/lib/angular/i18n/angular-locale_kn.js
  212. +0 −99 app/lib/angular/i18n/angular-locale_ko-kr.js
  213. +0 −99 app/lib/angular/i18n/angular-locale_ko.js
  214. +0 −99 app/lib/angular/i18n/angular-locale_ln-cd.js
  215. +0 −99 app/lib/angular/i18n/angular-locale_ln.js
  216. +0 −99 app/lib/angular/i18n/angular-locale_lt-lt.js
  217. +0 −99 app/lib/angular/i18n/angular-locale_lt.js
  218. +0 −99 app/lib/angular/i18n/angular-locale_lv-lv.js
  219. +0 −99 app/lib/angular/i18n/angular-locale_lv.js
  220. +0 −99 app/lib/angular/i18n/angular-locale_ml-in.js
  221. +0 −99 app/lib/angular/i18n/angular-locale_ml.js
  222. +0 −99 app/lib/angular/i18n/angular-locale_mr-in.js
  223. +0 −99 app/lib/angular/i18n/angular-locale_mr.js
  224. +0 −99 app/lib/angular/i18n/angular-locale_ms-my.js
  225. +0 −99 app/lib/angular/i18n/angular-locale_ms.js
  226. +0 −99 app/lib/angular/i18n/angular-locale_mt-mt.js
  227. +0 −99 app/lib/angular/i18n/angular-locale_mt.js
  228. +0 −99 app/lib/angular/i18n/angular-locale_nl-cw.js
  229. +0 −99 app/lib/angular/i18n/angular-locale_nl-nl.js
  230. +0 −99 app/lib/angular/i18n/angular-locale_nl-sx.js
  231. +0 −99 app/lib/angular/i18n/angular-locale_nl.js
  232. +0 −99 app/lib/angular/i18n/angular-locale_no.js
  233. +0 −99 app/lib/angular/i18n/angular-locale_or-in.js
  234. +0 −99 app/lib/angular/i18n/angular-locale_or.js
  235. +0 −99 app/lib/angular/i18n/angular-locale_pl-pl.js
  236. +0 −99 app/lib/angular/i18n/angular-locale_pl.js
  237. +0 −99 app/lib/angular/i18n/angular-locale_pt-br.js
  238. +0 −99 app/lib/angular/i18n/angular-locale_pt-pt.js
  239. +0 −99 app/lib/angular/i18n/angular-locale_pt.js
  240. +0 −99 app/lib/angular/i18n/angular-locale_ro-ro.js
  241. +0 −99 app/lib/angular/i18n/angular-locale_ro.js
  242. +0 −99 app/lib/angular/i18n/angular-locale_ru-ru.js
  243. +0 −99 app/lib/angular/i18n/angular-locale_ru.js
  244. +0 −99 app/lib/angular/i18n/angular-locale_sk-sk.js
  245. +0 −99 app/lib/angular/i18n/angular-locale_sk.js
  246. +0 −99 app/lib/angular/i18n/angular-locale_sl-si.js
  247. +0 −99 app/lib/angular/i18n/angular-locale_sl.js
  248. +0 −99 app/lib/angular/i18n/angular-locale_sq-al.js
  249. +0 −99 app/lib/angular/i18n/angular-locale_sq.js
  250. +0 −99 app/lib/angular/i18n/angular-locale_sr-cyrl-rs.js
  251. +0 −99 app/lib/angular/i18n/angular-locale_sr-latn-rs.js
  252. +0 −99 app/lib/angular/i18n/angular-locale_sr.js
  253. +0 −99 app/lib/angular/i18n/angular-locale_sv-se.js
  254. +0 −99 app/lib/angular/i18n/angular-locale_sv.js
  255. +0 −99 app/lib/angular/i18n/angular-locale_sw-tz.js
  256. +0 −99 app/lib/angular/i18n/angular-locale_sw.js
  257. +0 −99 app/lib/angular/i18n/angular-locale_ta-in.js
  258. +0 −99 app/lib/angular/i18n/angular-locale_ta.js
  259. +0 −99 app/lib/angular/i18n/angular-locale_te-in.js
  260. +0 −99 app/lib/angular/i18n/angular-locale_te.js
  261. +0 −99 app/lib/angular/i18n/angular-locale_th-th.js
  262. +0 −99 app/lib/angular/i18n/angular-locale_th.js
  263. +0 −99 app/lib/angular/i18n/angular-locale_tl.js
  264. +0 −99 app/lib/angular/i18n/angular-locale_tr-tr.js
  265. +0 −99 app/lib/angular/i18n/angular-locale_tr.js
  266. +0 −99 app/lib/angular/i18n/angular-locale_uk-ua.js
  267. +0 −99 app/lib/angular/i18n/angular-locale_uk.js
  268. +0 −99 app/lib/angular/i18n/angular-locale_ur-pk.js
  269. +0 −99 app/lib/angular/i18n/angular-locale_ur.js
  270. +0 −99 app/lib/angular/i18n/angular-locale_vi-vn.js
  271. +0 −99 app/lib/angular/i18n/angular-locale_vi.js
  272. +0 −99 app/lib/angular/i18n/angular-locale_zh-cn.js
  273. +0 −99 app/lib/angular/i18n/angular-locale_zh-hans-cn.js
  274. +0 −99 app/lib/angular/i18n/angular-locale_zh-hk.js
  275. +0 −99 app/lib/angular/i18n/angular-locale_zh-tw.js
  276. +0 −99 app/lib/angular/i18n/angular-locale_zh.js
  277. +0 −99 app/lib/angular/i18n/angular-locale_zu-za.js
  278. +0 −99 app/lib/angular/i18n/angular-locale_zu.js
  279. +0 −1 app/lib/angular/version.json
  280. +0 −1 app/lib/angular/version.txt
  281. +21 −0 bower.json
  282. +22 −6 package.json
  283. +0 −12 scripts/e2e-test.bat
  284. +0 −18 scripts/e2e-test.sh
  285. +0 −32 scripts/test-all.sh
  286. +0 −11 scripts/test.bat
  287. +0 −9 scripts/test.sh
  288. +0 −30 scripts/update-angular.sh
  289. +0 −19 scripts/watchr.rb
  290. +0 −244 scripts/web-server.js
  291. +3 −9 {config → test}/karma.conf.js
  292. +2 −2 {config → test}/protractor-conf.js
View
@@ -1,6 +1,7 @@
logs/*
!.gitkeep
node_modules/
+bower_components/
tmp
.DS_Store
.idea
View
@@ -4,35 +4,88 @@ This project is an application skeleton for a typical [AngularJS](http://angular
You can use it to quickly bootstrap your angular webapp projects and dev environment for these
projects.
-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 your) webserver and you are ready to develop and test your application.
+The seed contains a sample AngularJS application and is preconfigured to install the Angular
+framework and a bunch of development and testing tools for instant web development gratification.
-The seed app doesn't do much, just shows how to wire two controllers and views together. You can
-check it out by opening app/index.html in your browser (might not work file `file://` scheme in
-certain browsers, see note below).
+The seed app doesn't do much, just shows how to wire two controllers and views together.
-_Note: While angular is client-side-only technology and it's possible to create angular webapps that
-don't require a backend server at all, we recommend hosting the project files using a local
-webserver during development to avoid issues with security restrictions (sandbox) in browsers. The
-sandbox implementation varies between browsers, but quite often prevents things like cookies, xhr,
-etc to function properly when an html page is opened via `file://` scheme instead of `http://`._
+## Getting Started
+
+To get you started you can simply clone the angular-seed repository and run the preconfigured
+development web server...
+
+### Clone angular-seed
+
+Clone the angular-seed repository using [git][git]:
+
+```
+git clone https://github.com/angular/angular-seed.git
+cd angular-seed
+```
+
+### Run the Application
+
+We have preconfigured the project with node.js to download the latest stable version
+of AngularJS and install a simple development web server. The simplest way to do this is:
+
+```
+npm start
+```
+
+Now browse to the app at `http://localhost:8080/app/index.html`.
-## How to use angular-seed
-Clone the angular-seed repository and start hacking...
+## The AngularJS Files
+
+The AngularJS files are not stored inside the angular-seed project, we download them from the
+[bower][bower] repository. [Bower][bower] is a [node.js][node] utility for managing client-side web
+application dependencies. It is installed via npm.
+
+**Running `npm start`, in the [Getting Started](#Getting-Started) section, automatically installed
+[bower][bower] locally for us. You may prefer to have [bower][bower] installed globally**:
+
+```
+sudo npm install -g bower
+```
+
+Once we have bower installed, we can use it to get the Angular framework dependencies we need:
+
+```
+bower install
+```
+
+Bower will download all the necessary dependencies into the `bower_components` folder. Again, this
+is done automatically for us when we run `npm start`.
+
+## Serving the Application Files
+
+While angular is client-side-only technology and it's possible to create angular webapps that
+don't require a backend server at all, we recommend serving the project files using a local
+webserver during development to avoid issues with security restrictions (sandbox) in browsers. The
+sandbox implementation varies between browsers, but quite often prevents things like cookies, xhr,
+etc to function properly when an html page is opened via `file://` scheme instead of `http://`.
### Running the app during development
-You can pick one of these options:
+The angular-seed project comes preconfigured with a local development webserver. It is a node.js
+tool called `http-server`. You can start this webserver with `npm start` but you may choose to
+install the tool globally:
+
+```
+sudo npm install -g http-server
+```
+
+Then you can start your own development web server to server static files, from a folder, by
+running:
-* serve this repository with your webserver
-* install node.js and run `scripts/web-server.js`
+```
+http-server
+```
-Then navigate your browser to `http://localhost:<port>/app/index.html` to see the app running in
-your browser.
+Alternatively, you can choose to configure your own webserver, such as apache or nginx. Just
+configure your server to serve the files under the `app/` directory.
### Running the app in production
@@ -47,43 +100,84 @@ 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
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).
+reverse-proxying the backend server(s) and webserver(s).
+
+
+## Testing
+There are two kinds of tests in the angular-seed application: Unit tests and End to End tests.
-### Running unit tests
+### Running Unit Tests
We recommend using [jasmine](http://pivotal.github.com/jasmine/) and
[Karma](http://karma-runner.github.io) for your unit tests/specs, but you are free
to use whatever works for you.
-Requires [node.js](http://nodejs.org/), Karma (`sudo npm install -g karma`) and a local
-or remote browser.
+The angular-seed app comes preconfigured with such tests and a Karma configuration file to run them.
+
+* the configuration is found at `test/karma.conf.js`
+* the unit tests are found in `test/unit/`.
+
+The easiest way to run the unit tests is to use the supplied npm script:
+
+```
+npm test
+```
+
+This script will ensure that the Karma dependencies are installed and then start the Karma test
+runner to execute the unit tests. Karma will then sit and watch the application and test files for
+changes and re-run the tests whenever any of them change.
+
+The Karma Test Runner is a [node.js][node] tool. You may choose to install the CLI tool globally
+
+```
+sudo npm install -g karma
+```
+
+You can then start Karma directly, passing it the test configuration file:
+
+```
+karma start test/karma.conf.js
+```
+
+A browser will start and connect to the Karma server (Chrome is default browser, others can be
+captured by loading the same url as the one in Chrome or by changing the `test/karma.conf.js`
+file). Karma will then re-run the tests when there are changes to any of the source or test
+javascript files.
-* start `scripts/test.sh` (on windows: `scripts\test.bat`)
- * a browser will start and connect to the Karma server (Chrome is default browser, others can be captured by loading the same url as the one in Chrome or by changing the `config/karma.conf.js` file)
-* to run or re-run tests just change any of your source or test javascript files
### End to end testing
-We recommend using [protractor](https://github.com/angular/protractor) for end-to-end tests. It
-uses native events and has special features for Angular applications.
+We recommend using [Protractor][protractor] for end-to-end tests. It uses native events and has
+special features for Angular applications.
+
+* the configuration is found at `test/protractor-conf.js`
+* the end-to-end tests are found in `test/e2e/`
-Requires a webserver, node.js + `./scripts/web-server.js` or your backend server that hosts the angular static files.
+Protractor simulates interaction with our web app and verifies that the application responds
+correctly. Therefore, our web server needs to be serving up the application, so that Protractor
+can interact with it.
+
+Once you have ensured that the development web server hosting our application is up and running
+(probably `npm start`) you can run the end-to-end tests using the supplied npm script:
+
+```
+npm run-script protractor
+```
+
+This script will ensure that the dependencies (including the Selenium Web Driver component) are
+up to date and then execute the end-to-end tests against the application being hosted on the
+development server.
-* create your end-to-end tests in `test/e2e/scenarios.js`
-* serve your project directory with your http/backend server or node.js + `scripts/web-server.js`
-* to run:
- * run the tests from console with [Protractor](https://github.com/angular/protractor) via
- `scripts/e2e-test.sh` (on windows: `scripts\e2e-test.bat`)
### Continuous Integration
CloudBees have provided a CI/deployment setup:
<a href="https://grandcentral.cloudbees.com/?CB_clickstart=https://raw.github.com/CloudBees-community/angular-js-clickstart/master/clickstart.json"><img src="https://d3ko533tu1ozfq.cloudfront.net/clickstart/deployInstantly.png"/></a>
-If you run this, you will get a cloned version of this repo to start working on in a private git repo,
+If you run this, you will get a cloned version of this repo to start working on in a private git repo,
along with a CI service (in Jenkins) hosted that will run unit and end to end tests in both Firefox and Chrome.
### Receiving updates from upstream
@@ -116,24 +210,12 @@ fetch the changes and merge them into your project with git.
partial1.html
partial2.html
- config/karma.conf.js --> config file for running unit tests with Karma
- config/protractor-conf.js --> config file for running e2e tests with Protractor
-
- scripts/ --> handy shell/js/ruby scripts
- e2e-test.sh --> runs end-to-end tests with Karma (*nix)
- e2e-test.bat --> runs end-to-end tests with Karma (windows)
- test.bat --> autotests unit tests with Karma (windows)
- test.sh --> autotests unit tests with Karma (*nix)
- web-server.js --> simple development webserver based on node.js
-
- test/ --> test source files and libraries
- e2e/ -->
- scenarios.js --> end-to-end specs
- lib/
- angular/ --> angular testing libraries
- angular-mocks.js --> mocks that replace certain angular services in tests
- version.txt --> version file
- unit/ --> unit level specs/tests
+ test/ --> test config and source files
+ protractor-conf.js --> config file for running e2e tests with Protractor
+ e2e/ --> end-to-end specs
+ scenarios.js
+ karma.conf.js --> config file for running unit tests with Karma
+ unit/ --> unit level specs/tests
controllersSpec.js --> specs for controllers
directivessSpec.js --> specs for directives
filtersSpec.js --> specs for filters
@@ -142,3 +224,8 @@ fetch the changes and merge them into your project with git.
## Contact
For more information on AngularJS please check out http://angularjs.org/
+
+[git]: http://git-scm.com/
+[bower]: http://bower.io
+[node]: http://nodejs.org
+[protractor]: https://github.com/angular/protractor
@@ -32,8 +32,8 @@
// load all of the dependencies asynchronously.
$script([
- 'lib/angular/angular.js',
- 'lib/angular/angular-route.js',
+ '../bower_components/angular/angular.js',
+ '../bower_components/angular-route/angular-route.js',
'js/app.js',
'js/services.js',
'js/controllers.js',
@@ -23,8 +23,8 @@
// load all of the dependencies asynchronously.
$script([
- 'lib/angular/angular.js',
- 'lib/angular/angular-route.js',
+ '../bower_components/angular/angular.js',
+ '../bower_components/angular-route/angular-route.js',
'js/app.js',
'js/services.js',
'js/controllers.js',
View
@@ -18,8 +18,8 @@
<!-- In production use:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
-->
- <script src="lib/angular/angular.js"></script>
- <script src="lib/angular/angular-route.js"></script>
+ <script src="../bower_components/angular/angular.js"></script>
+ <script src="../bower_components/angular-route/angular-route.js"></script>
<script src="js/app.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
Oops, something went wrong.

0 comments on commit 5d2baf8

Please sign in to comment.