diff --git a/.babelrc b/.babelrc
new file mode 100644
index 000000000..287b76b83
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,10 @@
+{
+ "plugins": ["@babel/plugin-proposal-class-properties"],
+ "presets": [
+ ["@babel/preset-env", {
+ "targets": {
+ "node": "12"
+ }
+ }]
+ ]
+}
diff --git a/.gitbook/assets/angular-fullstack-logo.svg b/.gitbook/assets/angular-fullstack-logo.svg
new file mode 100644
index 000000000..bf40810ac
--- /dev/null
+++ b/.gitbook/assets/angular-fullstack-logo.svg
@@ -0,0 +1,9045 @@
+
+
+
+
diff --git a/.gitbook/assets/image (1).png b/.gitbook/assets/image (1).png
new file mode 100644
index 000000000..8079c8294
Binary files /dev/null and b/.gitbook/assets/image (1).png differ
diff --git a/.gitbook/assets/image (2).png b/.gitbook/assets/image (2).png
new file mode 100644
index 000000000..467d4479a
Binary files /dev/null and b/.gitbook/assets/image (2).png differ
diff --git a/.gitbook/assets/image (3).png b/.gitbook/assets/image (3).png
new file mode 100644
index 000000000..feed1d2cc
Binary files /dev/null and b/.gitbook/assets/image (3).png differ
diff --git a/.gitbook/assets/image (4).png b/.gitbook/assets/image (4).png
new file mode 100644
index 000000000..faab366dc
Binary files /dev/null and b/.gitbook/assets/image (4).png differ
diff --git a/.gitbook/assets/image (5).png b/.gitbook/assets/image (5).png
new file mode 100644
index 000000000..20a98b6b2
Binary files /dev/null and b/.gitbook/assets/image (5).png differ
diff --git a/.gitbook/assets/image (6).png b/.gitbook/assets/image (6).png
new file mode 100644
index 000000000..dfc1ea68c
Binary files /dev/null and b/.gitbook/assets/image (6).png differ
diff --git a/.gitbook/assets/image (7).png b/.gitbook/assets/image (7).png
new file mode 100644
index 000000000..a3f223f39
Binary files /dev/null and b/.gitbook/assets/image (7).png differ
diff --git a/.gitbook/assets/image.png b/.gitbook/assets/image.png
new file mode 100644
index 000000000..a3f223f39
Binary files /dev/null and b/.gitbook/assets/image.png differ
diff --git a/.gitignore b/.gitignore
index 78a6835b7..88c5c584e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,9 @@
node_modules
bower_components
-test/temp
+/generators/*
+/test/*
demo
.idea
.DS_Store
release.txt
-test/fixtures/bower.json
-test/fixtures/package.json
\ No newline at end of file
+static
diff --git a/.npmignore b/.npmignore
index ec6ff802d..5106adfe8 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,2 +1,18 @@
angular-fullstack-deps
test
+.idea
+src
+scripts
+ISSUE_TEMPLATE.md
+PULL_REQUEST_TEMPLATE.md
+/.travis.yml
+gulpfile.js
+Gruntfile.js
+.jshintrc
+/mocha.conf.js
+/media
+/docs
+/task-utils
+/.git*
+/circle.yml
+/.editorconfig
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 82f95fde5..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - '0.12'
-env:
- global:
- - SAUCE_USERNAME=fullstack_ci
- - SAUCE_ACCESS_KEY=1a527ca6-4aa5-4618-86ce-0278bf158cbf
-before_install:
- - ./scripts/sauce_connect_setup.sh
- - gem update --system
- - gem install sass --version "=3.3.7"
- - npm install -g bower grunt-cli
-services: mongodb
-cache:
- directories:
- - node_modules
- - test/fixtures/node_modules
- - test/fixtures/bower_components
-notifications:
- webhooks:
- urls:
- - secure: "DhPNqHXuUIeIGE9Ek3+63qhco+4MozXqMZL6dAKoq1MHQ2RAPO6SYIkUYZqDnuWYlwWao2EnTYcDREivIV/m/RnkP9bKlpX/n/RNJe+X4bwFaCU55fVKgkAFn3takSBC5SVoeTWHdWu3WhhqSdioWjT7mlE1wtt/RanSMb5Id8M="
- on_success: change # options: [always|never|change] default: always
- on_failure: always # options: [always|never|change] default: always
- on_start: false # default: false
-git:
- submodules: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b47eb6f1..80fb3e1ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,833 @@
+
+# [5.0.0-rc.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-rc.1...v5.0.0-rc.4) (2018-08-11)
+
+
+### Bug Fixes
+
+* **auth:** fix change password form ([4b147a4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4b147a4)), closes [#2747](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2747)
+* **client:** hotfix for Babel bug ([73d1e29](https://github.com/angular-fullstack/generator-angular-fullstack/commit/73d1e29))
+* **css:** refactor CSS handling ([68c6e39](https://github.com/angular-fullstack/generator-angular-fullstack/commit/68c6e39))
+* **express:** use cors in dev ([cf3c5e5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/cf3c5e5))
+* **gen:test:** refactor gen to fix tests w/ pug ([2080421](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2080421))
+* **package:** pin uws ([ed3b775](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ed3b775))
+* **server:**
+ * fix CSRF for Angular ([9c816ca](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9c816ca))
+ * SequelizeStore requires object with db ([e3cae48](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e3cae48)), closes [#2732](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2732)
+ * wsInitPromise should be passed into then in a function ([ce46519](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ce46519)), closes [#2751](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2751)
+* **webpack:** remove old plugins ([f1d3a7c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f1d3a7c))
+
+
+### Features
+
+* **app:**
+ * generate and serve pre-gzipped client files ([8f22699](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8f22699))
+ * use mini-css plugin ([3ac870a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3ac870a))
+* **gen:** add new route subgenerator ([91a13ff](https://github.com/angular-fullstack/generator-angular-fullstack/commit/91a13ff))
+* **package:**
+ * add 'gulp build' as build script ([f572635](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f572635))
+ * add build:server script ([b98d8a8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b98d8a8))
+ * reload server on changes ([6166123](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6166123))
+* **server:** allow mongo uri env var in dev ([a46a002](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a46a002))
+
+
+### Performance Improvements
+
+* **client:** comment out core-js imports\n\nas most people won't need them ([11decfe](https://github.com/angular-fullstack/generator-angular-fullstack/commit/11decfe))
+
+
+
+
+# [5.0.0-rc.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-rc.1...v5.0.0-rc.2) (2018-06-02)
+
+
+### Bug Fixes
+
+* **css:** refactor CSS handling ([68c6e39](https://github.com/angular-fullstack/generator-angular-fullstack/commit/68c6e39))
+* **gen:test:** refactor gen to fix tests w/ pug ([2080421](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2080421))
+
+
+### Features
+
+* **gen:** add new route subgenerator ([91a13ff](https://github.com/angular-fullstack/generator-angular-fullstack/commit/91a13ff))
+
+
+
+
+# [5.0.0-rc.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-beta.1...v5.0.0-rc.1) (2018-03-15)
+
+
+### Bug Fixes
+
+* **gen:** fix .npmignore ([c3bf61f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c3bf61f))
+
+
+
+
+# [5.0.0-rc.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-beta.1...v5.0.0-rc.0) (2018-03-08)
+
+
+### Bug Fixes
+
+* **client:** fix some outstanding client bugs ([f4c5471](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f4c5471))
+* **client:auth:guard:** declare `authService` on class ([afc725f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/afc725f))
+* **gen:**
+ * canary cleanup ([96364a7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/96364a7))
+ * don't convert main html file ([8d37569](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8d37569))
+* **package:** add missing comma ([b2a745b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b2a745b))
+* **seed:** rename index.html to app.html to fix CRSF and token issues ([2e784bf](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2e784bf))
+* **server:** fix express router usage ([542337e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/542337e))
+* **server:auth:** specify digest for pbkdf2 ([689c3fc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/689c3fc)), closes [#2628](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2628)
+* **server:test:** resolve primus in non-dev ([7bed185](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7bed185))
+* **test:**
+ * only save new primus.js in dev ([483dda0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/483dda0))
+ * use babel in `protractor.conf.js` ([ffb16cb](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ffb16cb))
+* misc cleanup ([a1619e6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a1619e6))
+
+
+### Features
+
+* **client:** add auth-guard service ([a5cbada](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a5cbada))
+* **package:**
+ * add separate client lint script for TS ([d426be7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d426be7))
+ * add test:server script ([24b6144](https://github.com/angular-fullstack/generator-angular-fullstack/commit/24b6144))
+
+
+# [5.0.0-beta.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-beta.1...v5.0.0-beta.3) (2017-11-30)
+
+
+### Bug Fixes
+
+* **client:auth:guard:** declare `authService` on class ([afc725f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/afc725f))
+
+
+
+
+# [5.0.0-beta.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-beta.1...v5.0.0-beta.2) (2017-11-12)
+
+
+### Bug Fixes
+
+* **package:** add missing comma ([b2a745b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b2a745b))
+* **server:test:** resolve primus in non-dev ([7bed185](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7bed185))
+* **test:**
+ * only save new primus.js in dev ([483dda0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/483dda0))
+ * use babel in `protractor.conf.js` ([ffb16cb](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ffb16cb))
+
+
+### Features
+
+* Upgraded to Angular 5.0.1
+* **client:** add auth-guard service ([a5cbada](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a5cbada))
+
+
+
+
+# [5.0.0-beta.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/5.0.0-beta.0...v5.0.0-beta.1) (2017-10-17)
+
+
+### Bug Fixes
+
+* **client:** fix thing redirect ([6e1b254](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6e1b254))
+* **client:auth:** fix session re-establish ([31a6ecf](https://github.com/angular-fullstack/generator-angular-fullstack/commit/31a6ecf)), closes [#2625](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2625)
+* **client:test:** fixes for TS ([47b9d3e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/47b9d3e))
+* **gen:**
+ * fix gen issue with flow on ([4f9618a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4f9618a))
+ * remedy test failure ([f226df9](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f226df9))
+* **server:** swap shrink-ray back out for compression ([e225a67](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e225a67))
+* **test:** disable `main.component.spec.js` ([c5e6db9](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c5e6db9))
+* **ts:** exclude typescript specs files from generating error on transpilling ([46f762e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/46f762e))
+* **webpack:** use a mock for primus in test ([689d0b2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/689d0b2))
+
+
+### Features
+
+* **client:auth:** don't submit forms if invalid ([d967554](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d967554))
+* **gen:** default Flow on ([804a917](https://github.com/angular-fullstack/generator-angular-fullstack/commit/804a917))
+* **package:**
+ * add `start:mongo` convenience script ([101f567](https://github.com/angular-fullstack/generator-angular-fullstack/commit/101f567))
+ * add linting scripts ([8cfe32e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8cfe32e))
+ * add start scripts ([e2bfff8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e2bfff8))
+ * add test:client script ([9be904d](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9be904d))
+
+
+
+
+# [5.0.0-alpha.5](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.0...v5.0.0-alpha.5) (2017-05-14)
+
+
+### Bug Fixes
+
+* **client:**
+ * fix a few client code errors ([5535fe3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5535fe3))
+ * fix loading css ([5d780fe](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5d780fe))
+ * fix upgrade stuff ([01e1054](https://github.com/angular-fullstack/generator-angular-fullstack/commit/01e1054))
+* **client:footer:** fix hardcoded template & style extentions ([c638fb6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c638fb6)), closes [#2421](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2421)
+* **client:main:** fix add/delete things ([91b920b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/91b920b))
+* **client:navbar:** fix hardcoded template ext ([5e999b2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5e999b2)), closes [#2469](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2469)
+* **client:userService:** use `id` or `_id` property ([4be3191](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4be3191))
+* **events:** mongoose event registration ([79bdeed](https://github.com/angular-fullstack/generator-angular-fullstack/commit/79bdeed)), closes [#2479](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2479)
+* **gen:**
+ * comment out ngCompnent stuff ([ab1bf13](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ab1bf13)), closes [#2403](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2403)
+ * fix another type stripping; also TS doesn't like default exports ([a55691a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a55691a))
+* **gen:factory:** fix factory subgen location ([b09cfe5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b09cfe5)), closes [#2381](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2381)
+* **mocha:** fix server not closing ([2ba3dd8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2ba3dd8))
+* **package:** move syntax plugins to deps ([c016979](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c016979)), closes [#2405](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2405)
+* **server:**
+ * fix new shared default export ([d4e4a7a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d4e4a7a))
+ * fix some bluebird warnings ([a84ff90](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a84ff90)), closes [#2412](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2412) [#2363](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2363)
+* **webpack:** fix CSS loader options ([3f7e2b4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3f7e2b4))
+
+
+### Features
+
+* **app:** convert to Angular 2 ([6c3b307](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6c3b307))
+* **gen:**
+ * add functions for adding TS public/private keywords ([17fea6c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/17fea6c))
+ * consolidate templates, convert html to pug during write ([f6deb25](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f6deb25))
+ * generate js with jscodeshift instead of babel ([bf8f9fc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bf8f9fc))
+ * replace socket.io w/ primus + uws ([ccea1f3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ccea1f3))
+ * use new base classes ([3debe1c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3debe1c))
+
+
+
+
+## [4.2.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.2.2...v4.2.3) (2017-11-29)
+
+This version reverts using shrink-ray by default (for Brotli compression) b/c so many users have has issues installing it.
+
+
+### Bug Fixes
+
+* **seed:** rename index.html to app.html to fix CRSF and token issues ([2e784bf](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2e784bf))
+* **server:auth:** specify digest for pbkdf2 ([689c3fc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/689c3fc)), closes [#2628](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2628)
+
+
+
+
+## [4.2.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.2.0...v4.2.2) (2017-05-25)
+
+
+### Bug Fixes
+
+* **seed:** fix unexpected token ([65a2438](https://github.com/angular-fullstack/generator-angular-fullstack/commit/65a2438)), closes [#2580](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2580)
+
+
+
+
+## [4.2.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.2.0...v4.2.1) (2017-05-22)
+
+
+### Bug Fixes
+
+* **client:auth:** fix isAdmin call ([8ac8821](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8ac8821)), closes [#2561](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2561)
+* **client:auth.service:** fix lodash import ([2dde95d](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2dde95d)), closes [#2549](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2549)
+* **gen:** fix yarn check command ([9ea681c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9ea681c))
+
+
+
+
+# [4.2.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.4...v4.2.0) (2017-04-19)
+
+## Notable Changes
+
+* `node-inspector` has been taken out in favor of Node's integrated `--inspect` flag.
+* @benmarten has taken care of a lot of the lint issues we've seen polluting the console
+* @benmarten also enabled the use of [Yarn](https://yarnpkg.com) if you have it installed. Thanks Ben!
+* Various other fixes. See the [comparison](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.4...4.2.0) for the full list.
+
+### Bug Fixes
+
+* **angular-validation-match:** Integration with Babel & Typescript ([#2517](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2517)) ([9db9918](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9db9918))
+
+
+
+
+## [4.1.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.2...v4.1.4) (2017-03-01)
+
+
+### Bug Fixes
+
+* **client:footer:**
+ * fix docs link (html) ([8d69c7a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8d69c7a)), closes [#2501](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2501)
+ * fix docs link (pug) ([190a121](https://github.com/angular-fullstack/generator-angular-fullstack/commit/190a121))
+* **events:** mongoose event registration ([e3ed67f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e3ed67f)), closes [#2479](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2479)
+* **webpack:**
+ * don't use html-plugin in test ([959c31c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/959c31c)), closes [#2374](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2374)
+ * use raw-loader for pug files ([a212236](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a212236))
+
+
+### Performance Improvements
+
+* **test:endpoint:**
+ * reduce number of eslint commands run ([6faa7f0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6faa7f0))
+ * remove unused imports ([95a5aab](https://github.com/angular-fullstack/generator-angular-fullstack/commit/95a5aab))
+* **test:main:** reduce number of app generations ([d42d0b6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d42d0b6))
+
+
+
+
+## [4.1.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.2...v4.1.3) (2017-02-11)
+
+
+### Bug Fixes
+
+* **events:** mongoose event registration ([e3ed67f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e3ed67f)), closes [#2479](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2479)
+* **webpack:** don't use html-plugin in test ([959c31c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/959c31c)), closes [#2374](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2374)
+
+
+### Performance Improvements
+
+* **test:endpoint:**
+ * reduce number of eslint commands run ([6faa7f0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6faa7f0))
+ * remove unused imports ([95a5aab](https://github.com/angular-fullstack/generator-angular-fullstack/commit/95a5aab))
+* **test:main:** reduce number of app generations ([d42d0b6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d42d0b6))
+
+
+
+
+## [4.1.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.1...v4.1.2) (2017-01-09)
+
+
+### Bug Fixes
+
+* **css:** fix stylus-loader options ([641646c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/641646c))
+* **eslint:** hides global variable warnings ([#2448](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2448)) ([6aae4f5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6aae4f5))
+* **sql:** Fix form field not displaying sequalize error ([d2cc15a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d2cc15a)), closes [#2400](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2400)
+* **webpack:css:** disable css-loader sourceMap option ([d48f0b0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d48f0b0)), closes [#2188](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2188)
+
+
+
+
+## [4.1.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.1.0...v4.1.1) (2016-12-08)
+
+
+## Notable Changes
+
+* Upgraded to Angular 1.6
+
+
+### Bug Fixes
+
+* **gen:factory:** fix factory subgen location ([b09cfe5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b09cfe5)), closes [#2381](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2381)
+
+
+
+
+# [4.1.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.5...v4.1.0) (2016-09-30)
+
+
+## Notable Changes
+
+* We've bumped some of the Babel deps to `^6.16.0`. This should fix the issues everyone's been seeing with class properties being stripped when using the default settings of Babel without Flow types.
+
+
+### Bug Fixes
+
+* **client:modal:** Fix unknown provider error ([68b7b69](https://github.com/angular-fullstack/generator-angular-fullstack/commit/68b7b69)), closes [#2247](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2247)
+
+
+### Features
+
+* **client:footer:**
+ * add documentation link ([ad44ee2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ad44ee2))
+ * modify footer ([3ca3cd5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3ca3cd5))
+* **gen:gulp:** port changelog code to gulp ([045abfb](https://github.com/angular-fullstack/generator-angular-fullstack/commit/045abfb))
+
+
+
+
+## [4.0.5](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.4...v4.0.5) (2016-09-15)
+
+
+### Bug Fixes
+
+* **client:auth:** fix hasOwnProperty instances, fix User usage ([#2232](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2232)) ([f41e420](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f41e420)), closes [#2232](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2232) [#2212](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2212)
+* **client:oauthButtons:** add ngInject ([#2209](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2209)) ([9ce58e8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9ce58e8)), closes [#2206](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2206)
+* **endpoint:controller:** fix findOneAndUpdate syntax ([1c2a219](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1c2a219)), closes [#2221](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2221)
+* **heroku:** Changed port variable to capital letters so heroku recognize it ([44dccba](https://github.com/angular-fullstack/generator-angular-fullstack/commit/44dccba)), closes [#2185](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2185)
+* **karma:** remove extra `require` ([c188229](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c188229)), closes [#2219](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2219)
+* **server:twitter:** make sure IDs are strings ([5991a72](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5991a72)), closes [#1997](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1997)
+* **socket:** add ngInject ([#2208](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2208)) ([b530695](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b530695)), closes [#2203](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2203)
+
+
+
+
+## [4.0.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.3...v4.0.4) (2016-09-01)
+
+
+### Bug Fixes
+
+* **webpack:**
+ * conditionally exclude ui-bootstrap ([dd131d9](https://github.com/angular-fullstack/generator-angular-fullstack/commit/dd131d9))
+ * fix webpack vendor import ([#2177](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2177)) ([aa32054](https://github.com/angular-fullstack/generator-angular-fullstack/commit/aa32054)), closes [#2177](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2177)
+
+
+
+
+## [4.0.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.2...v4.0.3) (2016-09-01)
+
+
+### Bug Fixes
+
+* **gen:** fix doc img generation\n\nAdd gulp task to copy images to gh-pages ([5bb43be](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5bb43be))
+* **gen:heroku:** fix module export, gen base ([8e50326](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8e50326)), closes [#2148](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2148)
+* **webpack:** fix bootstrap-sass import path ([bae1c86](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bae1c86))
+
+
+
+
+## [4.0.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.1...v4.0.2) (2016-09-01)
+
+
+### Bug Fixes
+
+* **client:socket.service:** import lodash named exports ([231e500](https://github.com/angular-fullstack/generator-angular-fullstack/commit/231e500))
+* **gulp:build:** remove protractor typings ([#2144](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2144)) ([b9abc58](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b9abc58))
+
+
+### Features
+
+* **docs:** add daux.io docs ([f1e7a87](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f1e7a87))
+* **gen:app:**
+ * add eslint to the yo write stream ([85921be](https://github.com/angular-fullstack/generator-angular-fullstack/commit/85921be)), closes [#2157](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2157)
+ * run eslint w/ fix on both client & server ([c5ab431](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c5ab431))
+* **gen:gulp:** add TODO tasks in gulpfile. rm 2 old grunt tasks ([1e25de7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1e25de7))
+
+
+
+
+## [4.0.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v4.0.0) (2016-08-08)
+
+
+## Notable Changes
+
+### [Webpack](http://webpack.github.io/)
+* No more Bower
+* Webpack is a Module Bundler for the front-end.
+* Everything starts in `client/app.js`. It imports (using CommonJS / ES2015 imports) everything else needed from there.
+* Whenever we create a new Angular 1 module, we export its name, and import that name in another module up the tree, all the way to `client/app.js`. This design pattern allows for easy lazy-loading.
+
+### Gulp v Grunt
+Grunt has been removed.
+* Gulp is significantly faster to run
+* Gulp focuses on programmatic configuration, which makes it a breeze to configure compared to Grunt's JSON-config-focused configuration.
+* Gulp development is much more active, with Gulp 4.0.0 hopefully being released soon.
+
+### ESLint
+JSHint + JSCS have been replaced with ESLint. ESLint provides a gigantic amount of rules, and is easily pluggable with many plugins. It uses Espree. Also, JSCS has merged with ESLint.
+
+### Types
+Flow support has been added. TypeScript type errors have been fixed.
+
+### Async/Sync Auth methods
+The following methods from the client Auth service have been split into two: `getCurrentUser`, `isLoggedIn`, `hasRole`, `isAdmin`. The reason that these methods could be both synchronous and asynchronous depending on how many arguments were passed is because they were called from Angular templates. Now, the Angular templates call the sync form of these methods (e.x. `getCurrentUserSync`), and the original functions are now only async.
+
+### Constants
+The task runner no longer takes care of creating an Angular module for config constants. It is taken care of by webpack now (the `shared.js` files is now just `require`d)
+
+### Endpoint PUT/PATCH
+PUT now defaults to an upsert. PATCH now actually does an HTTP PATCH.
+
+### -Livereload +Browsersync
+Livereload has been removed in favor of [Browsersync](https://www.browsersync.io/)
+
+
+
+
+# [3.8.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v3.8.0) (2016-09-15)
+
+
+### Bug Fixes
+
+* **authorization:** header workaround for IE11 ([2362103](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2362103)), closes [#2051](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2051)
+* **endpoint:controller:** wrap saveUpdates in an if(entity) statement ([31c0a79](https://github.com/angular-fullstack/generator-angular-fullstack/commit/31c0a79)), closes [#2052](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2052) [#2059](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2059)
+* **grunt:**
+ * add comma ([485c44b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/485c44b))
+ * run express:prod on production port ([aac61b2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/aac61b2)), closes [#1814](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1814)
+* **gulp:** fix plain css generation ([#2013](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2013)) ([54479fc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/54479fc)), closes [#2013](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2013)
+* **gulpfile:** gulp-filter[@4](https://github.com/4).0.0 need "dot:true" option ([1fbf24b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1fbf24b)), closes [#2146](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2146) [#2151](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2151)
+* **server:** return express stuff ([81ea8fa](https://github.com/angular-fullstack/generator-angular-fullstack/commit/81ea8fa))
+
+
+### Features
+
+* **gen:** add configurable ports ([#2005](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2005)) ([50e6d0c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/50e6d0c))
+
+
+
+
+## [3.7.6](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.5...v3.7.6) (2016-06-21)
+
+
+### Notable Changes
+
+* Add deprecation warning about Grunt
+* Bumped a few generator dependencies
+
+
+
+## [3.7.5](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.4...v3.7.5) (2016-06-02)
+
+
+### Bug Fixes
+
+* **build:** fix templateCache generation on gulpfile ([#1936](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1936)) ([#1942](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1942)) ([0286817](https://github.com/angular-fullstack/generator-angular-fullstack/commit/0286817)), closes [#1936](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1936) [#1942](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1942) [#1936](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1936)
+
+
+### Features
+
+* **genBase:** show raw stdout for yo check ([#1944](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1944)) ([7ae3829](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7ae3829))
+
+
+
+
+## [3.7.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.3...v3.7.4) (2016-05-25)
+
+
+### Bug Fixes
+
+* **build:** fix up PR 1896 ([3113a3e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3113a3e))
+* **ie:** IE11 log in works for ports 80 and 443 ([414b80a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/414b80a)), closes [#1880](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1880) [#1896](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1896)
+
+
+
+
+## [3.7.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.1...v3.7.2) (2016-05-15)
+
+
+### Bug Fixes
+
+* **gen:app:** fix insight askPermission ([f6f1fb6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f6f1fb6)), closes [#1889](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1889)
+
+
+
+
+## [3.7.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.0...v3.7.1) (2016-05-15)
+
+
+### Bug Fixes
+
+* **gen:** move bluebird to dependencies ([7d87697](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7d87697)), closes [#1888](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1888)
+
+
+
+
+# [3.7.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.6.1...v3.7.0) (2016-05-15)
+
+
+### Notable Changes
+* The Angular component sub-generator from generator-ng-component was added
+* The generator no longer uses the babel require hook at runtime
+* The generator's template files are now passed through Babel at scaffold time. This allows for things like removing type annotations if the user so chooses.
+* TypeScript uses typings instead of tsd
+
+
+### Bug Fixes
+
+* **client:** remove no-empty from tslint.json ([eafc4e0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/eafc4e0))
+* **client:navbar.controller:** refactor EJS, exclude constructor if empty ([a75b1d4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a75b1d4))
+* **e2e:main:** fix yeoman.png regex ([4b4db99](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4b4db99))
+* **express:** import `connect-mongo/es5` if node < 4 ([63fb77f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/63fb77f)), closes [#1844](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1844)
+* **gen:app:** only include `typings.json` with TS ([6f82220](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6f82220))
+* **gen:endpoint:**
+ * return promise ([6b30ef7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6b30ef7))
+ * typo ([0787039](https://github.com/angular-fullstack/generator-angular-fullstack/commit/0787039))
+* **gen:grunt:** update paths ([104efc6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/104efc6))
+* **gen:gulp:babel:** return the two merged streams ([3748953](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3748953))
+* **gen:gulp:clean:** also clean test dir ([aedb37e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/aedb37e))
+* **gen:gulp:updateFixtures:** fix saving as private/public ([a2cecab](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a2cecab))
+* **gen:test:endpoint:** `jshint` function also checks that the file exists ([17d9985](https://github.com/angular-fullstack/generator-angular-fullstack/commit/17d9985))
+* **gen:test:main:** fix sql e2e ([a9d238c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a9d238c))
+* **grunt:** exclude jshint config if using TypeScript ([54d4ebd](https://github.com/angular-fullstack/generator-angular-fullstack/commit/54d4ebd))
+* **gulp:** fix racing condition for copy:constant ([f07b451](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f07b451)), closes [#1830](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1830)
+* **package:**
+ * always make html2js a dependency ([bdf1e4a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bdf1e4a)), closes [#1722](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1722)
+ * grunt-injector 1.0.0 is broken ([3391299](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3391299))
+ * include gulp devDependency ([c857b27](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c857b27))
+* **server:**
+ * MONGOLAB_URI -> MONGODB_URI ([ae313df](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ae313df)), closes [#1838](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1838)
+* **server:oauth:**
+ * fix mongoose validation when re-login using twitter oauth ([5f8805d](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5f8805d))
+
+
+### Features
+
+* **client:auth:** add first type definition (`callback: Function`) ([7ed2585](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7ed2585))
+* **gen:**
+ * add component generator ([bf649ab](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bf649ab)), closes [#1711](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1711)
+ * also build test dir (just like generators dir) ([e09fb76](https://github.com/angular-fullstack/generator-angular-fullstack/commit/e09fb76))
+ * default to gulp, mocha ([4cc2da6](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4cc2da6))
+* **gen:app:** run all client files through Babel & JS Beautifier ([1d4ce11](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1d4ce11))
+* **gen:gulp:**
+ * add installFixtures task ([04a7878](https://github.com/angular-fullstack/generator-angular-fullstack/commit/04a7878))
+ * add mocha ([ead201a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/ead201a))
+ * port updateFixtures to Gulp (hot damn is it faster :fire:) ([94d69da](https://github.com/angular-fullstack/generator-angular-fullstack/commit/94d69da))
+* **gen:test:**
+ * add endpoint path name test ([0b36375](https://github.com/angular-fullstack/generator-angular-fullstack/commit/0b36375))
+ * add endpoint-specific tests ([887476f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/887476f))
+* **grunt:less:** add sourcemap options ([#1868](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1868)) ([55c9a18](https://github.com/angular-fullstack/generator-angular-fullstack/commit/55c9a18)), closes [#1765](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1765)
+* **gulp:ts:** inject client .ts test files automatically into config file. ([17cb4e4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/17cb4e4)), closes [#1828](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1828)
+
+
+
+
+# [3.6.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.6.0...v3.6.1) (2016-04-23)
+
+
+### Bug Fixes
+
+* **package:** revert to Grunt 0.4.5 if user chooses Grunt ([1cc91a3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1cc91a3)), closes [#1815](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1815)
+
+
+
+
+# [3.6.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.5.0...v3.6.0) (2016-04-21)
+
+
+### Bug Fixes
+
+* **gen:heroku:** allow for grunt or gulp ([954baa4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/954baa4))
+* **gen:openshift:** allow for grunt or gulp ([2f1a229](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2f1a229))
+* **gulp:** build images before rev-replace ([4139694](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4139694))
+* **gulp:copy:constant:** fix output dir ([a5e31cf](https://github.com/angular-fullstack/generator-angular-fullstack/commit/a5e31cf)), closes [#1748](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1748)
+* **gulp:inject:** prevent `'inject:css'` from showing up twice ([09b4f01](https://github.com/angular-fullstack/generator-angular-fullstack/commit/09b4f01))
+* **gulp:inject:css:** remove leading `/` ([6de6272](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6de6272))
+* **gulp:jshint:** include jshint alongside gulp-jshint ([978f6ba](https://github.com/angular-fullstack/generator-angular-fullstack/commit/978f6ba))
+* **gulp:serve:**
+ * add `env:all` ([27531fb](https://github.com/angular-fullstack/generator-angular-fullstack/commit/27531fb)), closes [#1779](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1779)
+ * remove extra comma ([d9d9f62](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d9d9f62))
+* **gulp:styles:** fix styles task for plain CSS ([dc72c33](https://github.com/angular-fullstack/generator-angular-fullstack/commit/dc72c33)), closes [#1747](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1747)
+* **gulp:test:client:** move around some `'tsd'` tasks ([86c7510](https://github.com/angular-fullstack/generator-angular-fullstack/commit/86c7510))
+* **gulp:wiredep:** copy `exclude` array code from Grunt ([2997e34](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2997e34)), closes [#1739](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1739)
+* **livereload:** ignore api routes and specific non-html files ([c6a396b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c6a396b)), closes [#1636](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1636) [#1764](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1764)
+* **server:user:spec:** replace `context` with `describe` ([5716660](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5716660))
+* **ts:**
+ * exclude ui-router.mock.ts from tsconfig.client.test.json if using ngroute ([3e40776](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3e40776))
+ * fix typo of gulp's typescript test configuration file ([023b261](https://github.com/angular-fullstack/generator-angular-fullstack/commit/023b261))
+* **user:** fix email and password validation ([474a3a1](https://github.com/angular-fullstack/generator-angular-fullstack/commit/474a3a1))
+
+### Features
+
+* **GitHub:** add issue and PR templates ([79b1db7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/79b1db7))
+* **gulp:**
+ * add serve:debug, add gulp-node-inspector ([f6eb26d](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f6eb26d))
+ * port `grunt buildcontrol` tasks over to gulp ([3221678](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3221678))
+
+
+
+
+## [3.5.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.4.2...v3.5.0) (2016-03-20)
+
+
+### Notable Changes
+
+A lot of various dependencies were updated
+
+
+### Bug Fixes
+
+* **gen:**
+ * import exec ([4f3f9dc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4f3f9dc))
+ * move some insight code ([7be23bd](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7be23bd))
+ * shim determineAppname, use name argument if provided ([bdaeb5a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bdaeb5a)), closes [#1682](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1682)
+* **grunt:** update rev-ed images in css as well as js ([5a24b83](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5a24b83)), closes [#977](https://github.com/angular-fullstack/generator-angular-fullstack/issues/977)
+* **grunt:filerev:** don't rev assets/fonts/ ([5228536](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5228536))
+* **gulp:** add inject:tsconfig to inject task ([bb045c5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bb045c5))
+* **gulp:build:** exclude local.env.sample.js ([429d5f3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/429d5f3)), closes [#1570](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1570)
+* **jshint:** capitalize MongoStore ([310cb22](https://github.com/angular-fullstack/generator-angular-fullstack/commit/310cb22))
+* **model:user:** add missing `return` statements ([f6ca289](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f6ca289))
+
+
+## [3.4.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.4.1...v3.4.2) (2016-03-12)
+
+
+### Features
+
+* **gen:** add Insight stat tracker ([fdf35b3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/fdf35b3))
+
+
+
+## [3.4.1](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.4.0...v3.4.1) (2016-03-11)
+
+
+### Bug Fixes
+
+* **gen:** shim determineAppname, use name argument if provided ([bdaeb5a](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bdaeb5a)), closes [#1682](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1682)
+* **grunt:** update rev-ed images in css as well as js ([5a24b83](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5a24b83)), closes [#977](https://github.com/angular-fullstack/generator-angular-fullstack/issues/977)
+* **grunt:filerev:** don't rev assets/fonts/ ([5228536](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5228536))
+* **gulp:** add inject:tsconfig to inject task ([bb045c5](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bb045c5))
+* **gulp:build:** exclude local.env.sample.js ([429d5f3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/429d5f3)), closes [#1570](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1570)
+
+
+
+# [3.4.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.3.0...v3.4.0) (2016-03-09)
+
+
+### Notable Changes
+
+* Updated Angular to 1.5 (the main page now uses an Angular 1.5 component)
+* Updated generator-ng-component to ~0.2.1. Angular subgenerators will now generate ES6 code and TypeScript code.
+* Updated angular-bootstrap to ~1.1.2
+* Updated bluebird to ^3.3.3, and set mongoose to use bluebird instead of mpromise. This allows us to remove promisification of mongoose APIs.
+* Updated PhantomJS to ^2.1.4
+
+### Bug Fixes
+
+* **deps:**
+ * always include grunt-babel if grunt chosen ([7ba7d1f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/7ba7d1f))
+ * include tslint ([543d784](https://github.com/angular-fullstack/generator-angular-fullstack/commit/543d784))
+* **gen:** fix Stylus & Sass extensions ([37d6c46](https://github.com/angular-fullstack/generator-angular-fullstack/commit/37d6c46)), closes [#1609](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1609)
+* **grunt:babel:** exclude local.env.sample.js ([3e0518b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3e0518b))
+* **grunt:injector:** sort js/ts modules ([fe6aba2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/fe6aba2))
+* **gulp:** add inject:tsconfig, change script watcher ([978e07e](https://github.com/angular-fullstack/generator-angular-fullstack/commit/978e07e))
+* **gulp:build:**
+ * add copy:fonts task ([27f1cc8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/27f1cc8))
+ * fix building when using Jade ([687cd09](https://github.com/angular-fullstack/generator-angular-fullstack/commit/687cd09))
+* **gulp:ts:** fix gulp not using latest typescript config after changed ([6a6afd9](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6a6afd9))
+* **gulp:tslint:** exclude both typings and test_typings ([2e83bd1](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2e83bd1))
+* **gulp:watch:** re-compile jade to .tmp ([18412a7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/18412a7))
+* **server:oauth:** fix sequelize syntax ([221f7a4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/221f7a4)), closes [#1654](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1654)
+* **tslint:** fix no-trailing-comma ([d7cd347](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d7cd347))
+
+### Features
+
+* **gen:** add 'es6' to generator-ng-component filters ([65530b3](https://github.com/angular-fullstack/generator-angular-fullstack/commit/65530b3))
+
+
+
+# [3.3.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.2.0...v3.3.0) (2016-02-02)
+
+
+### Notable Changes
+
+* TypeScript support
+* Gulp support
+
+### Features
+
+* **client:** move navbar and footer directive usage to around the router view directive in index.html ([c429adb](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c429adb))
+
+### Bug Fixes
+
+* **gulp:**
+ * make coverage tests work ([d3fd0c0](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d3fd0c0))
+ * exclude constant file from lint:scripts:client ([103db11](https://github.com/angular-fullstack/generator-angular-fullstack/commit/103db11)), closes [#1587](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1587)
+* **grunt:**
+ * fix wrong tslint vs jshint ([15f60db](https://github.com/angular-fullstack/generator-angular-fullstack/commit/15f60db))
+ * exclude constant file from jshint:all ([f4e590f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f4e590f))
+ * **babel:** don't try to transpile JSON files ([885438f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/885438f)), closes [#1561](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1561)
+ * **build:** don't copy local.env.sample ([be5a1f4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/be5a1f4)), closes [#1570](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1570)
+* **gen:test:** make sure we overwrite conflicts, add missing options from mock prompt options ([d6aeacf](https://github.com/angular-fullstack/generator-angular-fullstack/commit/d6aeacf))
+* **npm:** make sure to include mocha for server tests ([6c4e926](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6c4e926))
+
+
+
+# [3.3.0-beta.0](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.2.0...v3.3.0-beta.0) (2016-01-06)
+
+
+### Bug Fixes
+
+* **client:util.urlParse:** special treatment for IE ([869b45b](https://github.com/DaftMonk/generator-angular-fullstack/commit/869b45b))
+* **gulp:**
+ * **mocha:** have tests clean up once complete ([93dec12](https://github.com/DaftMonk/generator-angular-fullstack/commit/93dec12))
+ * **test:** fix gulp test dependencies ([7bc99fb](https://github.com/DaftMonk/generator-angular-fullstack/commit/7bc99fb))
+
+### Features
+
+* **client:** Add initial TypeScript support ([22d46d5](https://github.com/DaftMonk/generator-angular-fullstack/commit/22d46d5))
+
+
+
+# [3.2.0](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.1.1...v3.2.0) (2016-01-03)
+
+
+### Features
+
+* **app**: fix .gitattributes ([6b17ef7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6b17ef719424cbe4025a7abb3bdc7466853f700c))
+* **gulp**
+ * add missing tasks ([4d0e2ba](https://github.com/angular-fullstack/generator-angular-fullstack/commit/4d0e2ba32ddaa8c0f4a9a78cbce362843b522894))
+ * update useref to latest version ([f21a388](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f21a388f9e724b34cdd92f5a704782c2035e677d))
+ * add file revisioning for images ([3bf29b2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3bf29b27e4a3c61bc932af11dd3ea9a27c8fd48c))
+
+### Bug Fixes
+
+* **e2e**: force e2e tests to wait for angular ([842ab55](https://github.com/angular-fullstack/generator-angular-fullstack/commit/842ab558c721f114b27d9dae8d3b6e436db71af8))
+* **gen**: fix styleExt being `sass` instead of `scss` ([8f99a8f](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8f99a8ffb89e2c98b06b025bcdeb2374c839e81f))
+* **gen**: set scriptExt, templateExt, & styleExt when re-using a .yo-rc.json ([6e59229](https://github.com/angular-fullstack/generator-angular-fullstack/commit/6e59229afde8c3590da9d8f83bdd96c556fadfd6))
+* **gulp:**
+ * inject angular modules before other scripts ([c0d5a14](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c0d5a146fd18e9953ece8e180cfd4c33f8fac63f))
+ * clean .tmp folder in build task ([9596ba4](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9596ba47a1e817605eb9ccdb600f4aa62d718e3f))
+ * add missing gulp-env package ([cf017de](https://github.com/angular-fullstack/generator-angular-fullstack/commit/cf017debb7f2715896bf93003b576a0242a270b5))
+ * get client tests working ([0cb4a4b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/0cb4a4b9494a564508d6f2ec256374224465808b))
+ * use different transpile options for server and client ([bb67961](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bb679618d6bca2d84b7bc8adf1886f0171a5d005))
+ * make sure tests and main app file are not injected ([0171112](https://github.com/angular-fullstack/generator-angular-fullstack/commit/017111297968f3fcfb604273fa37d162ad01a714))
+ * make sure `.htaccess` is copied on build ([3602406](https://github.com/angular-fullstack/generator-angular-fullstack/commit/3602406631d4f5e73d51bab6d11c1d975b25bd00))
+ * call `wiredep:test` before running tests ([103adb2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/103adb2e19feda6bdb3487b3cde69afd12feb48d))
+ * **inject:css**: fix string that should be template string ([bb92502](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bb92502593a27045a05d6d8789f54f05fa9125f5))
+
+
+## [3.1.1](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.1.0...v3.1.1) (2015-12-15)
+
+
+### Bug Fixes
+
+* **client:auth.decorator**: fix Auth.isLoggedIn not having a noop arg ([0e9f302](https://github.com/angular-fullstack/generator-angular-fullstack/commit/0e9f3025fbe69c8613435e59d028cf6ce9b0e9e4))
+
+
+
+## [3.1.0](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.0.2...v3.1.0) (2015-12-13)
+
+
+### Bug Fixes
+
+* **client:auth:** fix auth 'decorator' ([56d12fc](https://github.com/DaftMonk/generator-angular-fullstack/commit/56d12fc)), closes [#1492](https://github.com/DaftMonk/generator-angular-fullstack/issues/1492)
+* **gulp:**
+ * add babel runtime options ([0a9afa1](https://github.com/DaftMonk/generator-angular-fullstack/commit/0a9afa1))
+ * update gulp.src in build:client ([6f4d3b0](https://github.com/DaftMonk/generator-angular-fullstack/commit/6f4d3b0))
+* **navbar:** fix controller constructor with ng-route + auth ([4b59e1f](https://github.com/DaftMonk/generator-angular-fullstack/commit/4b59e1f)), closes [#1462](https://github.com/DaftMonk/generator-angular-fullstack/issues/1462)
+
+### Features
+
+* **admin:** spruce up the look of the user list ([38bb6b8](https://github.com/DaftMonk/generator-angular-fullstack/commit/38bb6b8))
+* **gulp:** add experimental Gulp support ([c70fd47](https://github.com/DaftMonk/generator-angular-fullstack/commit/c70fd47)) `yo angular-fullstack --gulp`
+
+
+
+## [3.0.2](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.0.1...3.0.2) (2015-12-05)
+
+
+### Bug Fixes
+
+* **api:user:** remove `password` before sending user objects instead of `hashedPassword` ([c08bd95](https://github.com/DaftMonk/generator-angular-fullstack/commit/c08bd95)), closes [#1459](https://github.com/DaftMonk/generator-angular-fullstack/issues/1459)
+* **client:auth:** remove decorator logic ([3229acd](https://github.com/DaftMonk/generator-angular-fullstack/commit/3229acd)), closes [#1455](https://github.com/DaftMonk/generator-angular-fullstack/issues/1455)
+
+
+## [3.0.1](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.0.0...3.0.1) (2015-12-04)
+
+
+This version just changes the recommended Node version to ^4.2.3, since it fixes some vulnerabilities. Also, the Travis-CI config has been changed to loosely test Node 5.1.1 instead of 5.0.0.
+
+
+
+# [3.0.0](https://github.com/DaftMonk/generator-angular-fullstack/compare/2.1.1...3.0.0) (2015-12-06)
+
+### New Features
+
+ * **Sequelize** - You can now choose between MongoDB + Mongoose or SQLite3 + Sequelize
+ * **Babel** - We now include Babel transpiler support, with plans to add TypeScript in the future
+ * **Lusca** - Lusca Security Middleware is included by default
+ * **Angular Modules** - A few components of the front-end have been broken out into their own Angular modules, such as `auth`, `admin`, and a new `util` module
+ * **Modern Angular Best-Practices** - We have moved a lot of the code to take advantage of the `controllerAs` syntax, as well as ES6/ES7 Classes
+ * Mongoose Bluebird Promises
+
+### Breaking Changes
+
+ * **Node >= 4.2.2** - We now support versions of Node 4.2.2 and up. Since this is a generator for scaffolding out a new project, it makes sense to move support to the 4.2.2 Long Term Support (LTS) version of Node, since it is the most supported release by Node. It is likely that the generator will work with earlier versions of Node, but it is not recommended.
+ * **~~CoffeeScript~~, ~~Vanilla JS~~** - Removed CoffeeScript and vanilla JS support. CoffeeScript has served its purpose and been replaced by much better transpilers. Vanilla JS doesn't provide a lot of the features that enable good, modern code. We now only support Babel 5.8.x, and plan to add TypeScript support in the future.
+ * Removed some backwards-compatibility support code
+
+To see the full list of changes, click the '3.0.0' title to view the GitHub compare between 3.0.0 and 2.1.1
+
## [2.1.1](https://github.com/DaftMonk/generator-angular-fullstack/compare/2.1.0...2.1.1) (2015-07-29)
diff --git a/Gruntfile.js b/Gruntfile.js
index 64e407a11..2dfe12118 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,7 @@
-'use strict';
-
var shell = require('shelljs');
var child_process = require('child_process');
var Q = require('q');
-var helpers = require('yeoman-generator').test;
+var helpers = require('yeoman-test');
var fs = require('fs');
var path = require('path');
@@ -12,35 +10,13 @@ module.exports = function (grunt) {
var gitCmd = gruntUtils.gitCmd;
var gitCmdAsync = gruntUtils.gitCmdAsync;
- // Load grunt tasks automatically, when needed
- require('jit-grunt')(grunt, {
- buildcontrol: 'grunt-build-control'
- });
-
grunt.initConfig({
config: {
demo: 'demo'
},
pkg: grunt.file.readJSON('package.json'),
- conventionalChangelog: {
- options: {
- changelogOpts: {
- // conventional-changelog options go here
- preset: 'angular'
- },
- writerOpts: {
- // conventional-changelog-writer options go here
- finalizeContext: gruntUtils.conventionalChangelog.finalizeContext,
- commitPartial: gruntUtils.conventionalChangelog.commitPartial
- }
- },
- release: {
- src: 'CHANGELOG.md'
- }
- },
release: {
options: {
- bump: false, // remove after 3.0.0 release
commitMessage: '<%= version %>',
tagName: '<%= version %>',
file: 'package.json',
@@ -52,17 +28,6 @@ module.exports = function (grunt) {
npm: false
}
},
- updateSubmodules: {
- options: {
- modules: ['angular-fullstack-deps']
- }
- },
- commitNgFullstackDeps: {
- options: {
- cwd: 'angular-fullstack-deps',
- files: ['package.json', 'bower.json']
- }
- },
stage: {
options: {
files: ['CHANGELOG.md', 'angular-fullstack-deps']
@@ -83,43 +48,6 @@ module.exports = function (grunt) {
}
}
},
- jshint: {
- options: {
- curly: false,
- node: true
- },
- all: ['Gruntfile.js', '*/index.js']
- },
- env: {
- fast: {
- SKIP_E2E: true
- }
- },
- mochaTest: {
- test: {
- src: [
- 'test/*.js'
- ],
- options: {
- reporter: 'spec',
- timeout: 120000
- }
- }
- },
- clean: {
- demo: {
- files: [{
- dot: true,
- src: [
- '<%= config.demo %>/*',
- '!<%= config.demo %>/readme.md',
- '!<%= config.demo %>/node_modules',
- '!<%= config.demo %>/.git',
- '!<%= config.demo %>/dist'
- ]
- }]
- }
- },
david: {
gen: {
options: {}
@@ -137,26 +65,6 @@ module.exports = function (grunt) {
gitCmd(['add'].concat(files), {}, this.async());
});
- grunt.registerTask('updateSubmodules', function() {
- grunt.config.requires('updateSubmodules.options.modules');
- var modules = grunt.config.get('updateSubmodules').options.modules;
-
- Q()
- .then(gitCmdAsync(['submodule', 'update', '--init', '--recursive']))
- .then(function() {
- var thens = [];
- for (var i = 0, modulesLength = modules.length; i < modulesLength; i++) {
- var opts = {cwd: modules[i]};
- thens.push(gitCmdAsync(['checkout', 'master'], opts));
- thens.push(gitCmdAsync(['fetch'], opts));
- thens.push(gitCmdAsync(['pull'], opts));
- }
- return thens.reduce(Q.when, Q());
- })
- .catch(grunt.fail.fatal.bind(grunt.fail))
- .finally(this.async());
- });
-
grunt.registerTask('commitNgFullstackDeps', function() {
grunt.config.requires(
'commitNgFullstackDeps.options.files',
@@ -202,7 +110,7 @@ module.exports = function (grunt) {
testing: 'jasmine',
auth: true,
oauth: ['googleAuth', 'twitterAuth'],
- socketio: true
+ ws: true
};
var deps = [
@@ -262,63 +170,6 @@ module.exports = function (grunt) {
}
});
- grunt.registerTask('updateFixtures', 'updates package and bower fixtures', function(target) {
- var genVer = require('./package.json').version;
- var dest = __dirname + ((target === 'deps') ? '/angular-fullstack-deps/' : '/test/fixtures/');
- var appName = (target === 'deps') ? 'angular-fullstack-deps' : 'tempApp';
-
- var processJson = function(s, d) {
- // read file, strip all ejs conditionals, and parse as json
- var json = JSON.parse(fs.readFileSync(path.resolve(s), 'utf8').replace(/<%(.*)%>/g, ''));
- // set properties
- json.name = appName, json.version = genVer;
- if (target === 'deps') { json.private = false; }
- // stringify json and write it to the destination
- fs.writeFileSync(path.resolve(d), JSON.stringify(json, null, 2));
- };
-
- processJson('app/templates/_package.json', dest + 'package.json');
- processJson('app/templates/_bower.json', dest + 'bower.json');
- });
-
- grunt.registerTask('installFixtures', 'install package and bower fixtures', function() {
- var done = this.async();
-
- shell.cd('test/fixtures');
- grunt.log.ok('installing npm dependencies for generated app');
- child_process.exec('npm install --quiet', {cwd: '../fixtures'}, function (error, stdout, stderr) {
-
- grunt.log.ok('installing bower dependencies for generated app');
- child_process.exec('bower install', {cwd: '../fixtures'}, function (error, stdout, stderr) {
-
- if(!process.env.SAUCE_USERNAME) {
- grunt.log.ok('running npm run update-webdriver');
- child_process.exec('npm run update-webdriver', function() {
- shell.cd('../../');
- done();
- });
- } else {
- shell.cd('../../');
- done();
- }
- })
- });
- });
-
- grunt.registerTask('test', function(target, option) {
- if (target === 'fast') {
- grunt.task.run([
- 'env:fast'
- ]);
- }
-
- return grunt.task.run([
- 'updateFixtures',
- 'installFixtures',
- 'mochaTest'
- ])
- });
-
grunt.registerTask('deps', function(target) {
if (!target || target === 'app') grunt.task.run(['updateFixtures']);
grunt.task.run(['david:' + (target || '')]);
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000..cf31e70c0
--- /dev/null
+++ b/ISSUE_TEMPLATE.md
@@ -0,0 +1,20 @@
+ - [ ] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
+
+Item | Version
+----- | -----
+generator-angular-fullstack | x.x.x
+Node | x.x.x
+npm | x.x.x
+Operating System | OS X 10 / Windows 10 / Ubuntu 15.10 / etc
+etc | etc
+
+Item | Answer
+----- | -----
+Transpiler | Babel / TypeScript
+Markup | HTML / Pug
+CSS | CSS / LESS / SCSS / Stylus
+Router | ngRoute / ui-router
+Client Tests | Jasmine / Mocha
+DB | MongoDB / SQL
+Auth | Y / N
+etc | etc
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..c6b7b868e
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,3 @@
+- [ ] I have read the [Contributing Documents](https://github.com/DaftMonk/generator-angular-fullstack/blob/master/contributing.md)
+- [ ] My commit(s) follow the [AngularJS commit message guidelines](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/)
+- [ ] The generator's tests pass (`generator-angular-fullstack$ npm test`)
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..3d77289bc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,120 @@
+# The Angular Full-Stack Generator
+
+
+
+ [](https://www.npmjs.com/package/generator-angular-fullstack) [](https://david-dm.org/angular-fullstack/generator-angular-fullstack) [](https://david-dm.org/angular-fullstack/generator-angular-fullstack#type=dev) [](https://gitter.im/angular-fullstack/generator-angular-fullstack)
+
+> Yeoman generator for creating MEAN/SEAN stack applications, using ES2017, MongoDB/SQL, Express, Angular, and Node - lets you quickly set up a project following best practices.
+
+### Generated project:
+
+[](https://david-dm.org/angular-fullstack/angular-fullstack-deps) [](https://david-dm.org/angular-fullstack/angular-fullstack-deps?type=dev) [](https://snyk.io/package/npm/angular-fullstack-deps)
+
+## Usage
+
+Install `yo`, `gulp-cli`, and `generator-angular-fullstack`:
+
+```text
+npm install -g yo gulp-cli generator-angular-fullstack
+```
+
+**Please note**: If you run into trouble compiling native add-ons during the installation, follow [`node-gyp`](https://github.com/nodejs/node-gyp)'s short guide on [required compilation tools](https://github.com/nodejs/node-gyp#installation).
+
+Then, to run your app \(make sure the MongoDB daemon is running if you selected Mongo\), run the following to start your server:
+
+```bash
+npm run start:server
+```
+
+and the following to start the Webpack dev server for the front-end:
+
+```bash
+npm run start:client
+```
+
+The Webpack server will tell you which port to access the app at \(usually [http://localhost:8080/](http://localhost:8080/)\).
+
+Run `yo angular-fullstack`
+
+```text
+yo angular-fullstack
+```
+
+**See the** [**Getting Started**](https://angular-fullstack.github.io/get-started/) **guide for more information.**
+
+## Prerequisites
+
+* MongoDB - Download and Install [MongoDB](https://www.mongodb.com/download-center#community) - If you plan on scaffolding your project with mongoose, you'll need mongoDB to be installed and have the `mongod` process running.
+ * If you have [Docker](https://www.docker.com/) installed, you can easily run a test database with `docker run -p 27017:27017 --name afs-mongo -d mongo`
+* The project's JavaScript is written in ECMAScript 2015. If you're unfamiliar with the latest changes to the specification for JavaScript, check out [http://es6-features.org/](http://es6-features.org/)
+
+## Supported Configurations
+
+**General**
+
+* Build Systems: `Gulp`
+* Testing:
+ * `Jasmine`
+ * `Mocha + Chai + Sinon`
+ * Chai assertions:
+ * `Expect`
+ * `Should`
+
+**Client**
+
+* Scripts: `JavaScript (Babel)`, `TypeScript`
+* Module Systems: `Webpack`
+* Markup: `HTML`, `Pug`
+* Stylesheets: `CSS`, `Stylus`, `Sass`, `Less`
+* CSS Frameworks: `Bootstrap`
+ * Option to include `UI Bootstrap`
+
+**Server**
+
+* Scripts: `JavaScript (Babel)`, `TypeScript` \(planned\)
+* Database:
+ * `None`,
+ * `MongoDB`, `SQL`
+ * Authentication boilerplate: `Yes`, `No`
+ * oAuth integrations: `Facebook`, `Twitter`, `Google`
+ * Socket.io integration: `Yes`, `No`
+
+## Generators
+
+Available generators:
+
+* App
+ * [angular-fullstack](https://angular-fullstack.github.io/generators/app/) \(aka [angular-fullstack:app](https://angular-fullstack.github.io/generators/app/)\)
+* Server Side
+ * [angular-fullstack:endpoint](https://angular-fullstack.github.io/generators/endpoint)
+* Client Side \(via [generator-angular-fullstack-component](https://github.com/angular-fullstack/generator-angular-fullstack-component)\)
+ * [angular-fullstack:route](https://angular-fullstack.github.io/generators/route)
+* To be re-updated:
+ * [angular-fullstack:component](https://angular-fullstack.github.io/generators/component)
+ * [angular-fullstack:controller](https://angular-fullstack.github.io/generators/controller)
+ * [angular-fullstack:filter](https://angular-fullstack.github.io/generators/filter)
+ * [angular-fullstack:directive](https://angular-fullstack.github.io/generators/directive)
+ * [angular-fullstack:service](https://angular-fullstack.github.io/generators/service)
+ * [angular-fullstack:provider](https://angular-fullstack.github.io/generators/service)
+ * [angular-fullstack:factory](https://angular-fullstack.github.io/generators/service)
+ * [angular-fullstack:decorator](https://angular-fullstack.github.io/generators/decorator)
+* Deployment
+ * [angular-fullstack:openshift](https://angular-fullstack.github.io/generators/openshift)
+ * [angular-fullstack:heroku](https://angular-fullstack.github.io/generators/heroku)
+
+## Documentation
+
+Check out our [documentation home page](https://awk34.gitbook.io/generator-angular-fullstack).
+
+## Contribute
+
+See the [contributing docs](https://github.com/angular-fullstack/generator-angular-fullstack/blob/master/contributing.md)
+
+When submitting an issue, please follow the [Yeoman issue guidelines](https://github.com/yeoman/yeoman/blob/master/contributing.md#issue-submission). Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue, as well as any stack traces.
+
+## License
+
+[BSD license](http://opensource.org/licenses/bsd-license.php)
+
+[](https://awk34.gitbook.io/generator-angular-fullstack)
+
diff --git a/SUMMARY.md b/SUMMARY.md
new file mode 100644
index 000000000..f7897f126
--- /dev/null
+++ b/SUMMARY.md
@@ -0,0 +1,32 @@
+# Table of contents
+
+* [The Angular Full-Stack Generator](README.md)
+
+## Getting Started
+
+* [Pre-Requisites](getting-started/pre-requisites.md)
+* [Installation](getting-started/installation.md)
+* [Running](getting-started/running.md)
+* [Project Overview](getting-started/project-overview.md)
+
+## Developing
+
+* [Overview](developing/overview.md)
+* [Adding a Route](developing/adding-a-route.md)
+
+## Deployment
+
+* [Manual Deployment](deployment/manual-deployment.md)
+* [Google Cloud Deployment](deployment/untitled-1.md)
+* [index](deployment/untitled.md)
+
+## Generators
+
+* [App](generators/app.md)
+* [Endpoint](generators/endpoint.md)
+
+## Contributing
+
+* [Releasing a New Version](contributing/releasing-a-new-version.md)
+* [Commit Style](contributing/untitled-1.md)
+
diff --git a/angular-fullstack-deps b/angular-fullstack-deps
index 45f8b0937..d0b7c8633 160000
--- a/angular-fullstack-deps
+++ b/angular-fullstack-deps
@@ -1 +1 @@
-Subproject commit 45f8b093793dfb562db32777f897d538a403bfc4
+Subproject commit d0b7c86332f3ea3091332f307b10141ff90e4ad7
diff --git a/app/generator.js b/app/generator.js
deleted file mode 100644
index e0465a299..000000000
--- a/app/generator.js
+++ /dev/null
@@ -1,437 +0,0 @@
-'use strict';
-
-import fs from 'fs';
-import path from 'path';
-import chalk from 'chalk';
-import {Base} from 'yeoman-generator';
-import {genBase} from '../generator-base';
-
-export default class Generator extends Base {
-
- constructor(...args) {
- super(...args);
-
- this.argument('name', { type: String, required: false });
-
- this.option('skip-install', {
- desc: 'Do not install dependencies',
- type: Boolean,
- defaults: false
- });
-
- this.option('app-suffix', {
- desc: 'Allow a custom suffix to be added to the module name',
- type: String,
- defaults: 'App'
- });
- }
-
- get initializing() {
- return {
-
- init: function () {
- this.config.set('generatorVersion', this.rootGeneratorVersion());
- this.filters = {};
-
- // init shared generator properies and methods
- genBase(this);
- },
-
- info: function () {
- this.log(chalk.red(`
-################################################################
-# NOTE: You are using a pre-release version of
-# generator-angular-fullstack. For a more stable version, run
-# \`npm install -g generator-angular-fullstack@^2.0.0\`
-################################################################`));
- this.log('You\'re using the Angular Full-Stack Generator, version ' + this.rootGeneratorVersion());
- this.log(this.yoWelcome);
- this.log('Out of the box I create an AngularJS app with an Express server.\n');
- },
-
- checkForConfig: function() {
- var cb = this.async();
- var existingFilters = this.config.get('filters');
-
- if(existingFilters) {
- this.prompt([{
- type: 'confirm',
- name: 'skipConfig',
- message: 'Existing .yo-rc configuration found, would you like to use it?',
- default: true,
- }], function (answers) {
- this.skipConfig = answers.skipConfig;
-
- if (this.skipConfig) {
- this.filters = existingFilters;
- } else {
- this.filters = {};
- this.forceConfig = true;
- this.config.set('filters', this.filters);
- this.config.forceSave();
- }
-
- cb();
- }.bind(this));
- } else {
- cb();
- }
- }
-
- };
- }
-
- get prompting() {
- return {
-
- clientPrompts: function() {
- if(this.skipConfig) return;
- var cb = this.async();
-
- this.log('# Client\n');
-
- this.prompt([{
- type: 'list',
- name: 'script',
- message: 'What would you like to write scripts with?',
- choices: [ 'JavaScript', 'JavaScript + Babel'],
- filter: function( val ) {
- return {
- 'JavaScript': 'js',
- 'JavaScript + Babel': 'babel'
- }[val];
- }
- }, {
- type: 'list',
- name: 'markup',
- message: 'What would you like to write markup with?',
- choices: ['HTML', 'Jade'],
- filter: function( val ) { return val.toLowerCase(); }
- }, {
- type: 'list',
- name: 'stylesheet',
- default: 1,
- message: 'What would you like to write stylesheets with?',
- choices: [ 'CSS', 'Sass', 'Stylus', 'Less'],
- filter: function( val ) { return val.toLowerCase(); }
- }, {
- type: 'list',
- name: 'router',
- default: 1,
- message: 'What Angular router would you like to use?',
- choices: [ 'ngRoute', 'uiRouter'],
- filter: function( val ) { return val.toLowerCase(); }
- }, {
- type: 'confirm',
- name: 'bootstrap',
- message: 'Would you like to include Bootstrap?'
- }, {
- type: 'confirm',
- name: 'uibootstrap',
- message: 'Would you like to include UI Bootstrap?',
- when: function (answers) {
- return answers.bootstrap;
- }
- }], function (answers) {
-
- // also set 'js' to true if using babel
- if(answers.script === 'babel') { this.filters.js = true; }
- this.filters[answers.script] = true;
- this.filters[answers.markup] = true;
- this.filters[answers.stylesheet] = true;
- this.filters[answers.router] = true;
- this.filters.bootstrap = !!answers.bootstrap;
- this.filters.uibootstrap = !!answers.uibootstrap;
- cb();
- }.bind(this));
- },
-
- serverPrompts: function() {
- if(this.skipConfig) return;
- var cb = this.async();
- var self = this;
-
- this.log('\n# Server\n');
-
- this.prompt([{
- type: 'checkbox',
- name: 'odms',
- message: 'What would you like to use for data modeling?',
- choices: [
- {
- value: 'mongoose',
- name: 'Mongoose (MongoDB)',
- checked: true
- },
- {
- value: 'sequelize',
- name: 'Sequelize (MySQL, SQLite, MariaDB, PostgreSQL)',
- checked: false
- }
- ]
- }, {
- type: 'list',
- name: 'models',
- message: 'What would you like to use for the default models?',
- choices: [ 'Mongoose', 'Sequelize' ],
- filter: function( val ) {
- return val.toLowerCase();
- },
- when: function(answers) {
- return answers.odms && answers.odms.length > 1;
- }
- }, {
- type: 'confirm',
- name: 'auth',
- message: 'Would you scaffold out an authentication boilerplate?',
- when: function (answers) {
- return answers.odms && answers.odms.length !== 0;
- }
- }, {
- type: 'checkbox',
- name: 'oauth',
- message: 'Would you like to include additional oAuth strategies?',
- when: function (answers) {
- return answers.auth;
- },
- choices: [
- {
- value: 'googleAuth',
- name: 'Google',
- checked: false
- },
- {
- value: 'facebookAuth',
- name: 'Facebook',
- checked: false
- },
- {
- value: 'twitterAuth',
- name: 'Twitter',
- checked: false
- }
- ]
- }, {
- type: 'confirm',
- name: 'socketio',
- message: 'Would you like to use socket.io?',
- // to-do: should not be dependent on ODMs
- when: function (answers) {
- return answers.odms && answers.odms.length !== 0;
- },
- default: true
- }], function (answers) {
- if(answers.socketio) this.filters.socketio = true;
- if(answers.auth) this.filters.auth = true;
- if(answers.odms && answers.odms.length > 0) {
- var models;
- if(!answers.models) {
- models = answers.odms[0];
- } else {
- models = answers.models;
- }
- this.filters.models = true;
- this.filters[models + 'Models'] = true;
- answers.odms.forEach(function(odm) {
- this.filters[odm] = true;
- }.bind(this));
- } else {
- this.filters.noModels = true;
- }
- if(answers.oauth) {
- if(answers.oauth.length) this.filters.oauth = true;
- answers.oauth.forEach(function(oauthStrategy) {
- this.filters[oauthStrategy] = true;
- }.bind(this));
- }
-
- cb();
- }.bind(this));
- },
-
- projectPrompts: function() {
- if(this.skipConfig) return;
- var cb = this.async();
- var self = this;
-
- this.log('\n# Project\n');
-
- this.prompt([{
- type: 'list',
- name: 'testing',
- message: 'What would you like to write tests with?',
- choices: [ 'Jasmine', 'Mocha + Chai + Sinon'],
- filter: function( val ) {
- var filterMap = {
- 'Jasmine': 'jasmine',
- 'Mocha + Chai + Sinon': 'mocha'
- };
-
- return filterMap[val];
- }
- }, {
- type: 'list',
- name: 'chai',
- message: 'What would you like to write Chai assertions with?',
- choices: ['Expect', 'Should'],
- filter: function( val ) {
- return val.toLowerCase();
- },
- when: function( answers ) {
- return answers.testing === 'mocha';
- }
- }], function (answers) {
- /**
- * Default to grunt until gulp support is implemented
- */
- this.filters.grunt = true;
-
- this.filters[answers.testing] = true;
- if (answers.testing === 'mocha') {
- this.filters.jasmine = false;
- this.filters.should = false;
- this.filters.expect = false;
- this.filters[answers.chai] = true;
- }
- if (answers.testing === 'jasmine') {
- this.filters.mocha = false;
- this.filters.should = false;
- this.filters.expect = false;
- }
-
- cb();
- }.bind(this));
- }
-
- };
- }
-
- get configuring() {
- return {
-
- saveSettings: function() {
- if(this.skipConfig) return;
- this.config.set('endpointDirectory', 'server/api/');
- this.config.set('insertRoutes', true);
- this.config.set('registerRoutesFile', 'server/routes.js');
- this.config.set('routesNeedle', '// Insert routes below');
-
- this.config.set('routesBase', '/api/');
- this.config.set('pluralizeRoutes', true);
-
- this.config.set('insertSockets', true);
- this.config.set('registerSocketsFile', 'server/config/socketio.js');
- this.config.set('socketsNeedle', '// Insert sockets below');
-
- this.config.set('insertModels', true);
- this.config.set('registerModelsFile', 'server/sqldb/index.js');
- this.config.set('modelsNeedle', '// Insert models below');
-
- this.config.set('filters', this.filters);
- this.config.forceSave();
- },
-
- ngComponent: function() {
- if(this.skipConfig) return;
- var appPath = 'client/app/';
- var extensions = [];
- var filters = [
- 'ngroute',
- 'uirouter',
- 'jasmine',
- 'mocha',
- 'expect',
- 'should'
- ].filter(function(v) {return this.filters[v];}, this);
-
- if(this.filters.ngroute) filters.push('ngroute');
- if(this.filters.uirouter) filters.push('uirouter');
- if(this.filters.babel) extensions.push('babel');
- if(this.filters.js) extensions.push('js');
- if(this.filters.html) extensions.push('html');
- if(this.filters.jade) extensions.push('jade');
- if(this.filters.css) extensions.push('css');
- if(this.filters.stylus) extensions.push('styl');
- if(this.filters.sass) extensions.push('scss');
- if(this.filters.less) extensions.push('less');
-
- this.composeWith('ng-component', {
- options: {
- 'routeDirectory': appPath,
- 'directiveDirectory': appPath,
- 'filterDirectory': appPath,
- 'serviceDirectory': appPath,
- 'filters': filters,
- 'extensions': extensions,
- 'basePath': 'client',
- 'forceConfig': this.forceConfig
- }
- }, { local: require.resolve('generator-ng-component/app/index.js') });
- },
-
- ngModules: function() {
- var angModules = [
- "'ngCookies'",
- "'ngResource'",
- "'ngSanitize'"
- ];
- if(this.filters.ngroute) angModules.push("'ngRoute'");
- if(this.filters.socketio) angModules.push("'btford.socket-io'");
- if(this.filters.uirouter) angModules.push("'ui.router'");
- if(this.filters.uibootstrap) angModules.push("'ui.bootstrap'");
- if(this.filters.auth) angModules.push("'validation.match'");
-
- this.angularModules = '\n ' + angModules.join(',\n ') +'\n';
- }
-
- };
- }
-
- get default() {
- return {};
- }
-
- get writing() {
- return {
-
- generateProject: function() {
- this.sourceRoot(path.join(__dirname, './templates'));
- this.processDirectory('.', '.');
- },
-
- generateEndpoint: function() {
- var models;
- if (this.filters.mongooseModels) {
- models = 'mongoose';
- } else if (this.filters.sequelizeModels) {
- models = 'sequelize';
- }
- this.composeWith('angular-fullstack:endpoint', {
- options: {
- route: '/api/things',
- models: models
- },
- args: ['thing']
- });
- }
-
- };
- }
-
- get install() {
- return {
-
- installDeps: function() {
- this.installDependencies({
- skipInstall: this.options['skip-install']
- });
- }
-
- };
- }
-
- get end() {
- return {};
- }
-
-}
diff --git a/app/index.js b/app/index.js
deleted file mode 100644
index 11dde883e..000000000
--- a/app/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-// Register the Babel require hook
-require('babel-core/register')({
- only: /generator-angular-fullstack\/(?!node_modules)/
-});
-
-// Export the generator
-exports = module.exports = require('./generator');
diff --git a/app/templates/.bowerrc b/app/templates/.bowerrc
deleted file mode 100644
index 666f34745..000000000
--- a/app/templates/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory": "client/bower_components"
-}
diff --git a/app/templates/.gitattributes b/app/templates/.gitattributes
deleted file mode 100644
index f49b99cfa..000000000
--- a/app/templates/.gitattributes
+++ /dev/null
@@ -1,7 +0,0 @@
-* text eol=lf
-
-# Denote all files that are truly binary and should not be modified.
-*.png binary
-*.gif binary
-*.jpg binary
-*.jpeg binary
diff --git a/app/templates/.jscs.json b/app/templates/.jscs.json
deleted file mode 100644
index 99393d5f6..000000000
--- a/app/templates/.jscs.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "maximumLineLength": {
- "value": 100,
- "allowComments": true,
- "allowRegex": true
- },
- "disallowMixedSpacesAndTabs": true,
- "disallowMultipleLineStrings": true,
- "disallowNewlineBeforeBlockStatements": true,
- "disallowSpaceAfterObjectKeys": true,
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "disallowSpaceBeforeBinaryOperators": [","],
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "disallowSpacesInAnonymousFunctionExpression": {
- "beforeOpeningRoundBrace": true
- },
- "disallowSpacesInFunctionDeclaration": {
- "beforeOpeningRoundBrace": true
- },
- "disallowSpacesInNamedFunctionExpression": {
- "beforeOpeningRoundBrace": true
- },
- "disallowSpacesInsideArrayBrackets": true,
- "disallowSpacesInsideParentheses": true,
- "disallowTrailingComma": true,
- "disallowTrailingWhitespace": true,
- "requireCommaBeforeLineBreak": true,
- "requireLineFeedAtFileEnd": true,
- "requireSpaceAfterBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"],
- "requireSpaceBeforeBinaryOperators": ["?", ":", "+", "-", "/", "*", "%", "==", "===", "!=", "!==", ">", ">=", "<", "<=", "&&", "||"],
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
- "requireSpaceBeforeBlockStatements": true,
- "requireSpacesInConditionalExpression": {
- "afterTest": true,
- "beforeConsequent": true,
- "afterConsequent": true,
- "beforeAlternate": true
- },
- "requireSpacesInFunction": {
- "beforeOpeningCurlyBrace": true
- },
- "validateLineBreaks": "LF",
- "validateParameterSeparator": ", "
-}
diff --git a/app/templates/.travis.yml b/app/templates/.travis.yml
deleted file mode 100644
index c12f57edb..000000000
--- a/app/templates/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - '0.12'
-before_script:
- - npm install -g bower grunt-cli<% if (filters.sass) { %>
- - gem install sass<% } %>
- - bower install
-services: mongodb
diff --git a/app/templates/Gruntfile.js b/app/templates/Gruntfile.js
deleted file mode 100644
index 1168d75b0..000000000
--- a/app/templates/Gruntfile.js
+++ /dev/null
@@ -1,902 +0,0 @@
-// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= rootGeneratorName() %> <%= rootGeneratorVersion() %>
-'use strict';
-
-module.exports = function (grunt) {
- var localConfig;
- try {
- localConfig = require('./server/config/local.env');
- } catch(e) {
- localConfig = {};
- }
-
- // Load grunt tasks automatically, when needed
- require('jit-grunt')(grunt, {
- express: 'grunt-express-server',
- useminPrepare: 'grunt-usemin',
- ngtemplates: 'grunt-angular-templates',
- cdnify: 'grunt-google-cdn',
- protractor: 'grunt-protractor-runner',
- buildcontrol: 'grunt-build-control',
- istanbul_check_coverage: 'grunt-mocha-istanbul'
- });
-
- // Time how long tasks take. Can help when optimizing build times
- require('time-grunt')(grunt);
-
- // Define the configuration for all the tasks
- grunt.initConfig({
-
- // Project settings
- pkg: grunt.file.readJSON('package.json'),
- yeoman: {
- // configurable paths
- client: require('./bower.json').appPath || 'client',
- server: 'server',
- dist: 'dist'
- },
- express: {
- options: {
- port: process.env.PORT || 9000
- },
- dev: {
- options: {
- script: '<%%= yeoman.server %>',
- debug: true
- }
- },
- prod: {
- options: {
- script: '<%%= yeoman.dist %>/<%%= yeoman.server %>'
- }
- }
- },
- open: {
- server: {
- url: 'http://localhost:<%%= express.options.port %>'
- }
- },
- watch: {<% if(filters.babel) { %>
- babel: {
- files: ['<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js'],
- tasks: ['newer:babel:client']
- },<% } %>
- injectJS: {
- files: [
- '<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js',
- '!<%%= yeoman.client %>/app/app.js'
- ],
- tasks: ['injector:scripts']
- },
- injectCss: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.css'],
- tasks: ['injector:css']
- },
- mochaTest: {
- files: ['<%%= yeoman.server %>/**/*.{spec,integration}.js'],
- tasks: ['env:test', 'mochaTest']
- },
- jsTest: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.{spec,mock}.js'],
- tasks: ['newer:jshint:all', 'wiredep:test', 'karma']
- },<% if (filters.stylus) { %>
- injectStylus: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.styl'],
- tasks: ['injector:stylus']
- },
- stylus: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.styl'],
- tasks: ['stylus', 'postcss']
- },<% } if (filters.sass) { %>
- injectSass: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
- tasks: ['injector:sass']
- },
- sass: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
- tasks: ['sass', 'postcss']
- },<% } if (filters.less) { %>
- injectLess: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.less'],
- tasks: ['injector:less']
- },
- less: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.less'],
- tasks: ['less', 'postcss']
- },<% } if (filters.jade) { %>
- jade: {
- files: ['<%%= yeoman.client %>/{app,components}/**/*.jade'],
- tasks: ['jade']
- },<% } %>
- gruntfile: {
- files: ['Gruntfile.js']
- },
- livereload: {
- files: [
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.{css,html}',
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/!(*.spec|*.mock).js',
- '<%%= yeoman.client %>/assets/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}'
- ],
- options: {
- livereload: true
- }
- },
- express: {
- files: ['<%%= yeoman.server %>/**/*.{js,json}'],
- tasks: ['express:dev', 'wait'],
- options: {
- livereload: true,
- spawn: false //Without this option specified express won't be reloaded
- }
- },
- bower: {
- files: ['bower.json'],
- tasks: ['wiredep']
- },
- },
-
- // Make sure code styles are up to par and there are no obvious mistakes
- jshint: {
- options: {
- jshintrc: '<%%= yeoman.client %>/.jshintrc',
- reporter: require('jshint-stylish')
- },
- server: {
- options: {
- jshintrc: '<%%= yeoman.server %>/.jshintrc'
- },
- src: ['<%%= yeoman.server %>/**/!(*.spec|*.integration).js']
- },
- serverTest: {
- options: {
- jshintrc: '<%%= yeoman.server %>/.jshintrc-spec'
- },
- src: ['<%%= yeoman.server %>/**/*.{spec,integration}.js']
- },
- all: ['<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js'],
- test: {
- src: ['<%%= yeoman.client %>/{app,components}/**/*.{spec,mock}.js']
- }
- },
-
- jscs: {
- options: {
- config: ".jscs.json"
- },
- main: {
- files: {
- src: [
- '<%%= yeoman.client %>/app/**/*.js',
- '<%%= yeoman.server %>/**/*.js'
- ]
- }
- }
- },
-
- // Empties folders to start fresh
- clean: {
- dist: {
- files: [{
- dot: true,
- src: [
- '.tmp',
- '<%%= yeoman.dist %>/!(.git*|.openshift|Procfile)**'
- ]
- }]
- },
- server: '.tmp'
- },
-
- // Add vendor prefixed styles
- postcss: {
- options: {
- map: true,
- processors: [
- require('autoprefixer')({browsers: ['last 2 version']})
- ]
- },
- dist: {
- files: [{
- expand: true,
- cwd: '.tmp/',
- src: '{,*/}*.css',
- dest: '.tmp/'
- }]
- }
- },
-
- // Debugging with node inspector
- 'node-inspector': {
- custom: {
- options: {
- 'web-host': 'localhost'
- }
- }
- },
-
- // Use nodemon to run server in debug mode with an initial breakpoint
- nodemon: {
- debug: {
- script: '<%%= yeoman.server %>',
- options: {
- nodeArgs: ['--debug-brk'],
- env: {
- PORT: process.env.PORT || 9000
- },
- callback: function (nodemon) {
- nodemon.on('log', function (event) {
- console.log(event.colour);
- });
-
- // opens browser on initial server start
- nodemon.on('config:update', function () {
- setTimeout(function () {
- require('open')('http://localhost:8080/debug?port=5858');
- }, 500);
- });
- }
- }
- }
- },
-
- // Automatically inject Bower components into the app and karma.conf.js
- wiredep: {
- options: {
- exclude: [ <% if(filters.uibootstrap) { %>
- /bootstrap.js/,<% } %>
- '/json3/',
- '/es5-shim/'<% if(!filters.css) { %>,
- /font-awesome\.css/<% if(filters.bootstrap) { %>,
- /bootstrap\.css/<% if(filters.sass) { %>,
- /bootstrap-sass-official/<% } if(filters.oauth) { %>,
- /bootstrap-social\.css/<% }}} %>
- ]
- },
- client: {
- src: '<%%= yeoman.client %>/index.html',
- ignorePath: '<%%= yeoman.client %>/',
- },
- test: {
- src: './karma.conf.js',
- devDependencies: true
- }
- },
-
- // Renames files for browser caching purposes
- filerev: {
- dist: {
- src: [
- '<%%= yeoman.dist %>/client/!(bower_components){,*/}*.{js,css}',
- '<%%= yeoman.dist %>/client/assets/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
- '<%%= yeoman.dist %>/client/assets/fonts/*'
- ]
- }
- },
-
- // Reads HTML for usemin blocks to enable smart builds that automatically
- // concat, minify and revision files. Creates configurations in memory so
- // additional tasks can operate on them
- useminPrepare: {
- html: ['<%%= yeoman.client %>/index.html'],
- options: {
- dest: '<%%= yeoman.dist %>/client'
- }
- },
-
- // Performs rewrites based on rev and the useminPrepare configuration
- usemin: {
- html: ['<%%= yeoman.dist %>/client/{,!(bower_components)/**/}*.html'],
- css: ['<%%= yeoman.dist %>/client/!(bower_components){,*/}*.css'],
- js: ['<%%= yeoman.dist %>/client/!(bower_components){,*/}*.js'],
- options: {
- assetsDirs: [
- '<%%= yeoman.dist %>/client',
- '<%%= yeoman.dist %>/client/assets/images'
- ],
- // This is so we update image references in our ng-templates
- patterns: {
- js: [
- [/(assets\/images\/.*?\.(?:gif|jpeg|jpg|png|webp|svg))/gm, 'Update the JS to reference our revved images']
- ]
- }
- }
- },
-
- // The following *-min tasks produce minified files in the dist folder
- imagemin: {
- dist: {
- files: [{
- expand: true,
- cwd: '<%%= yeoman.client %>/assets/images',
- src: '{,*/}*.{png,jpg,jpeg,gif,svg}',
- dest: '<%%= yeoman.dist %>/client/assets/images'
- }]
- }
- },
-
- // Allow the use of non-minsafe AngularJS files. Automatically makes it
- // minsafe compatible so Uglify does not destroy the ng references
- ngAnnotate: {
- dist: {
- files: [{
- expand: true,
- cwd: '.tmp/concat',
- src: '**/*.js',
- dest: '.tmp/concat'
- }]
- }
- },
-
- // Package all the html partials into a single javascript payload
- ngtemplates: {
- options: {
- // This should be the name of your apps angular module
- module: '<%= scriptAppName %>',
- htmlmin: {
- collapseBooleanAttributes: true,
- collapseWhitespace: true,
- removeAttributeQuotes: true,
- removeEmptyAttributes: true,
- removeRedundantAttributes: true,
- removeScriptTypeAttributes: true,
- removeStyleLinkTypeAttributes: true
- },
- usemin: 'app/app.js'
- },
- main: {
- cwd: '<%%= yeoman.client %>',
- src: ['{app,components}/**/*.html'],
- dest: '.tmp/templates.js'
- },
- tmp: {
- cwd: '.tmp',
- src: ['{app,components}/**/*.html'],
- dest: '.tmp/tmp-templates.js'
- }
- },
-
- // Replace Google CDN references
- cdnify: {
- dist: {
- html: ['<%%= yeoman.dist %>/client/*.html']
- }
- },
-
- // Copies remaining files to places other tasks can use
- copy: {
- dist: {
- files: [{
- expand: true,
- dot: true,
- cwd: '<%%= yeoman.client %>',
- dest: '<%%= yeoman.dist %>/client',
- src: [
- '*.{ico,png,txt}',
- '.htaccess',
- 'bower_components/**/*',
- 'assets/images/{,*/}*.{webp}',
- 'assets/fonts/**/*',
- 'index.html'
- ]
- }, {
- expand: true,
- cwd: '.tmp/images',
- dest: '<%%= yeoman.dist %>/client/assets/images',
- src: ['generated/*']
- }, {
- expand: true,
- dest: '<%%= yeoman.dist %>',
- src: [
- 'package.json',
- '<%%= yeoman.server %>/**/*'
- ]
- }]
- },
- styles: {
- expand: true,
- cwd: '<%%= yeoman.client %>',
- dest: '.tmp/',
- src: ['{app,components}/**/*.css']
- }
- },
-
- buildcontrol: {
- options: {
- dir: '<%%= yeoman.dist %>',
- commit: true,
- push: true,
- connectCommits: false,
- message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
- },
- heroku: {
- options: {
- remote: 'heroku',
- branch: 'master'
- }
- },
- openshift: {
- options: {
- remote: 'openshift',
- branch: 'master'
- }
- }
- },
-
- // Run some tasks in parallel to speed up the build process
- concurrent: {
- server: [<% if(filters.babel) { %>
- 'newer:babel:client',<% } if(filters.jade) { %>
- 'jade',<% } if(filters.stylus) { %>
- 'stylus',<% } if(filters.sass) { %>
- 'sass',<% } if(filters.less) { %>
- 'less',<% } %>
- ],
- test: [<% if(filters.babel) { %>
- 'newer:babel:client',<% } if(filters.jade) { %>
- 'jade',<% } if(filters.stylus) { %>
- 'stylus',<% } if(filters.sass) { %>
- 'sass',<% } if(filters.less) { %>
- 'less',<% } %>
- ],
- debug: {
- tasks: [
- 'nodemon',
- 'node-inspector'
- ],
- options: {
- logConcurrentOutput: true
- }
- },
- dist: [<% if(filters.babel) { %>
- 'newer:babel:client',<% } if(filters.jade) { %>
- 'jade',<% } if(filters.stylus) { %>
- 'stylus',<% } if(filters.sass) { %>
- 'sass',<% } if(filters.less) { %>
- 'less',<% } %>
- 'imagemin'
- ]
- },
-
- // Test settings
- karma: {
- unit: {
- configFile: 'karma.conf.js',
- singleRun: true
- }
- },
-
- mochaTest: {
- options: {
- reporter: 'spec',
- require: 'mocha.conf.js',
- timeout: 5000 // set default mocha spec timeout
- },
- unit: {
- src: ['<%%= yeoman.server %>/**/*.spec.js']
- },
- integration: {
- src: ['<%%= yeoman.server %>/**/*.integration.js']
- }
- },
-
- mocha_istanbul: {
- unit: {
- options: {
- excludes: ['**/*.{spec,mock,integration}.js'],
- reporter: 'spec',
- require: ['mocha.conf.js'],
- mask: '**/*.spec.js',
- coverageFolder: 'coverage/server/unit'
- },
- src: '<%%= yeoman.server %>'
- },
- integration: {
- options: {
- excludes: ['**/*.{spec,mock,integration}.js'],
- reporter: 'spec',
- require: ['mocha.conf.js'],
- mask: '**/*.integration.js',
- coverageFolder: 'coverage/server/integration'
- },
- src: '<%%= yeoman.server %>'
- }
- },
-
- istanbul_check_coverage: {
- default: {
- options: {
- coverageFolder: 'coverage/**',
- check: {
- lines: 80,
- statements: 80,
- branches: 80,
- functions: 80
- }
- }
- }
- },
-
- protractor: {
- options: {
- configFile: 'protractor.conf.js'
- },
- chrome: {
- options: {
- args: {
- browser: 'chrome'
- }
- }
- }
- },
-
- env: {
- test: {
- NODE_ENV: 'test'
- },
- prod: {
- NODE_ENV: 'production'
- },
- all: localConfig
- },<% if (filters.jade) { %>
-
- // Compiles Jade to html
- jade: {
- compile: {
- options: {
- data: {
- debug: false
- }
- },
- files: [{
- expand: true,
- cwd: '<%%= yeoman.client %>',
- src: ['{app,components}/**/*.jade'],
- dest: '.tmp',
- ext: '.html'
- }]
- }
- },<% } %>
-
- // Compiles ES6 to JavaScript using Babel
- babel: {
- options: {
- sourceMap: true
- },<% if(filters.babel) { %>
- client: {
- files: [{
- expand: true,
- cwd: '<%%= yeoman.client %>',
- src: ['{app,components}/**/!(*.spec).js'],
- dest: '.tmp'
- }]
- },<% } %>
- server: {
- options: {
- optional: ['runtime']
- },
- files: [{
- expand: true,
- cwd: '<%%= yeoman.server %>',
- src: ['**/*.{js,json}'],
- dest: '<%%= yeoman.dist %>/<%%= yeoman.server %>'
- }]
- }
- },<% if(filters.stylus) { %>
-
- // Compiles Stylus to CSS
- stylus: {
- server: {
- options: {
- "include css": true
- },
- files: {
- '.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.styl'
- }
- }
- },<% } if (filters.sass) { %>
-
- // Compiles Sass to CSS
- sass: {
- server: {
- options: {
- compass: false
- },
- files: {
- '.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.scss'
- }
- }
- },<% } if (filters.less) { %>
-
- // Compiles Less to CSS
- less: {
- server: {
- files: {
- '.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.less'
- }
- }
- },<% } %>
-
- injector: {
- options: {
-
- },
- // Inject application script files into index.html (doesn't include bower)
- scripts: {
- options: {
- transform: function(filePath) {
- filePath = filePath.replace('/client/', '');
- filePath = filePath.replace('/.tmp/', '');
- return '';
- },
- starttag: '',
- endtag: ''
- },
- files: {
- '<%%= yeoman.client %>/index.html': [
- [<% if(filters.babel) { %>
- '.tmp/{app,components}/**/!(*.spec|*.mock).js',<% } else { %>
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/!(*.spec|*.mock).js',<% } %>
- '!{.tmp,<%%= yeoman.client %>}/app/app.js'
- ]
- ]
- }
- },<% if (filters.stylus) { %>
-
- // Inject component styl into app.styl
- stylus: {
- options: {
- transform: function(filePath) {
- filePath = filePath.replace('/client/app/', '');
- filePath = filePath.replace('/client/components/', '../components/');
- return '@import \'' + filePath + '\';';
- },
- starttag: '// injector',
- endtag: '// endinjector'
- },
- files: {
- '<%%= yeoman.client %>/app/app.styl': [
- '<%%= yeoman.client %>/{app,components}/**/*.styl',
- '!<%%= yeoman.client %>/app/app.styl'
- ]
- }
- },<% } if (filters.sass) { %>
-
- // Inject component scss into app.scss
- sass: {
- options: {
- transform: function(filePath) {
- filePath = filePath.replace('/client/app/', '');
- filePath = filePath.replace('/client/components/', '../components/');
- return '@import \'' + filePath + '\';';
- },
- starttag: '// injector',
- endtag: '// endinjector'
- },
- files: {
- '<%%= yeoman.client %>/app/app.scss': [
- '<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}',
- '!<%%= yeoman.client %>/app/app.{scss,sass}'
- ]
- }
- },<% } if (filters.less) { %>
-
- // Inject component less into app.less
- less: {
- options: {
- transform: function(filePath) {
- filePath = filePath.replace('/client/app/', '');
- filePath = filePath.replace('/client/components/', '../components/');
- return '@import \'' + filePath + '\';';
- },
- starttag: '// injector',
- endtag: '// endinjector'
- },
- files: {
- '<%%= yeoman.client %>/app/app.less': [
- '<%%= yeoman.client %>/{app,components}/**/*.less',
- '!<%%= yeoman.client %>/app/app.less'
- ]
- }
- },<% } %>
-
- // Inject component css into index.html
- css: {
- options: {
- transform: function(filePath) {
- filePath = filePath.replace('/client/', '');
- filePath = filePath.replace('/.tmp/', '');
- return '';
- },
- starttag: '',
- endtag: ''
- },
- files: {
- '<%%= yeoman.client %>/index.html': [
- '<%%= yeoman.client %>/{app,components}/**/*.css'
- ]
- }
- }
- },
- });
-
- // Used for delaying livereload until after server has restarted
- grunt.registerTask('wait', function () {
- grunt.log.ok('Waiting for server reload...');
-
- var done = this.async();
-
- setTimeout(function () {
- grunt.log.writeln('Done waiting!');
- done();
- }, 1500);
- });
-
- grunt.registerTask('express-keepalive', 'Keep grunt running', function() {
- this.async();
- });
-
- grunt.registerTask('serve', function (target) {
- if (target === 'dist') {
- return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'open', 'express-keepalive']);
- }
-
- if (target === 'debug') {
- return grunt.task.run([
- 'clean:server',
- 'env:all',<% if (filters.stylus) { %>
- 'injector:stylus',<% } if (filters.less) { %>
- 'injector:less',<% } if (filters.sass) { %>
- 'injector:sass',<% } %>
- 'concurrent:server',
- 'injector',
- 'wiredep:client',
- 'postcss',
- 'concurrent:debug'
- ]);
- }
-
- grunt.task.run([
- 'clean:server',
- 'env:all',<% if (filters.stylus) { %>
- 'injector:stylus',<% } if (filters.less) { %>
- 'injector:less',<% } if (filters.sass) { %>
- 'injector:sass',<% } %>
- 'concurrent:server',
- 'injector',
- 'wiredep:client',
- 'postcss',
- 'express:dev',
- 'wait',
- 'open',
- 'watch'
- ]);
- });
-
- grunt.registerTask('server', function () {
- grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
- grunt.task.run(['serve']);
- });
-
- grunt.registerTask('test', function(target, option) {
- if (target === 'server') {
- return grunt.task.run([
- 'env:all',
- 'env:test',
- 'mochaTest:unit',
- 'mochaTest:integration'
- ]);
- }
-
- else if (target === 'client') {
- return grunt.task.run([
- 'clean:server',
- 'env:all',<% if (filters.stylus) { %>
- 'injector:stylus',<% } if (filters.less) { %>
- 'injector:less',<% } if (filters.sass) { %>
- 'injector:sass',<% } %>
- 'concurrent:test',
- 'injector',
- 'postcss',
- 'wiredep:test',
- 'karma'
- ]);
- }
-
- else if (target === 'e2e') {
-
- if (option === 'prod') {
- return grunt.task.run([
- 'build',
- 'env:all',
- 'env:prod',
- 'express:prod',
- 'protractor'
- ]);
- }
-
- else {
- return grunt.task.run([
- 'clean:server',
- 'env:all',
- 'env:test',<% if (filters.stylus) { %>
- 'injector:stylus',<% } if (filters.less) { %>
- 'injector:less',<% } if (filters.sass) { %>
- 'injector:sass',<% } %>
- 'concurrent:test',
- 'injector',
- 'wiredep:client',
- 'postcss',
- 'express:dev',
- 'protractor'
- ]);
- }
- }
-
- else if (target === 'coverage') {
-
- if (option === 'unit') {
- return grunt.task.run([
- 'env:all',
- 'env:test',
- 'mocha_istanbul:unit'
- ]);
- }
-
- else if (option === 'integration') {
- return grunt.task.run([
- 'env:all',
- 'env:test',
- 'mocha_istanbul:integration'
- ]);
- }
-
- else if (option === 'check') {
- return grunt.task.run([
- 'istanbul_check_coverage'
- ]);
- }
-
- else {
- return grunt.task.run([
- 'env:all',
- 'env:test',
- 'mocha_istanbul',
- 'istanbul_check_coverage'
- ]);
- }
-
- }
-
- else grunt.task.run([
- 'test:server',
- 'test:client'
- ]);
- });
-
- grunt.registerTask('build', [
- 'clean:dist',<% if (filters.stylus) { %>
- 'injector:stylus',<% } if (filters.less) { %>
- 'injector:less',<% } if (filters.sass) { %>
- 'injector:sass',<% } %>
- 'concurrent:dist',
- 'injector',
- 'wiredep:client',
- 'useminPrepare',
- 'postcss',
- 'ngtemplates',
- 'concat',
- 'ngAnnotate',
- 'copy:dist',
- 'babel:server',
- 'cdnify',
- 'cssmin',
- 'uglify',
- 'filerev',
- 'usemin'
- ]);
-
- grunt.registerTask('default', [
- 'newer:jshint',
- 'test',
- 'build'
- ]);
-};
diff --git a/app/templates/README.md b/app/templates/README.md
deleted file mode 100644
index 6cf5065f8..000000000
--- a/app/templates/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# <%= lodash.slugify(lodash.humanize(appname)) %>
-
-This project was generated with the [Angular Full-Stack Generator](https://github.com/DaftMonk/generator-angular-fullstack) version <%= rootGeneratorVersion() %>.
-
-## Getting Started
-
-### Prerequisites
-
-- [Git](https://git-scm.com/)
-- [Node.js and NPM](nodejs.org) >= v0.12.0
-- [Bower](bower.io) (`npm install --global bower`)<% if(filters.sass) { %>
-- [Ruby](https://www.ruby-lang.org) and then `gem install sass`<% } if(filters.grunt) { %>
-- [Grunt](http://gruntjs.com/) (`npm install --global grunt-cli`)<% } if(filters.gulp) { %>
-- [Gulp](http://gulpjs.com/) (`npm install --global gulp`)<% } if(filters.mongoose) { %>
-- [MongoDB](https://www.mongodb.org/) - Keep a running daemon with `mongod`<% } if(filters.sequelize) { %>
-- [SQLite](https://www.sqlite.org/quickstart.html)<% } %>
-
-### Developing<% var i = 1; %>
-
-<%= i++ %>. Run `npm install` to install server dependencies.
-
-<%= i++ %>. Run `bower install` to install front-end dependencies.<% if(filters.mongoose) { %>
-
-<%= i++ %>. Run `mongod` in a separate shell to keep an instance of the MongoDB Daemon running<% } %>
-
-<%= i++ %>. Run <% if(filters.grunt) { %>`grunt serve`<% } if(filters.grunt && filters.gulp) { %> or <% } if(filters.gulp) { %>`gulp serve`<% } %> to start the development server. It should automatically open the client in your browser when ready.
-
-## Build & development
-
-Run `grunt build` for building and `grunt serve` for preview.
-
-## Testing
-
-Running `npm test` will run the unit tests with karma.
diff --git a/app/templates/_bower.json b/app/templates/_bower.json
deleted file mode 100644
index b0de0c559..000000000
--- a/app/templates/_bower.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "<%= lodash.slugify(lodash.humanize(appname)) %>",
- "version": "0.0.0",
- "dependencies": {
- "angular": "~1.4.0",
- "json3": "~3.3.1",
- "es5-shim": "~3.0.1",<% if(filters.bootstrap) { if (filters.sass) { %>
- "bootstrap-sass-official": "~3.1.1",<% } %>
- "bootstrap": "~3.1.1",<% if(filters.oauth) { %>
- "bootstrap-social": "~4.9.1",<% }} %>
- "angular-resource": "~1.4.0",
- "angular-cookies": "~1.4.0",
- "angular-sanitize": "~1.4.0",<% if (filters.ngroute) { %>
- "angular-route": "~1.4.0",<% } if (filters.uibootstrap) { %>
- "angular-bootstrap": "~0.13.0",<% } %>
- "font-awesome": ">=4.1.0",
- "lodash": "~2.4.1"<% if(filters.socketio) { %>,
- "angular-socket-io": "~0.7.0"<% } if (filters.uirouter) { %>,
- "angular-ui-router": "~0.2.15"<% } if (filters.auth) { %>,
- "angular-validation-match": "~1.5.2"<% } %>
- },
- "devDependencies": {
- "angular-mocks": "~1.4.0"
- }
-}
diff --git a/app/templates/_package.json b/app/templates/_package.json
deleted file mode 100644
index 01f57c1bd..000000000
--- a/app/templates/_package.json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- "name": "<%= lodash.slugify(lodash.humanize(appname)) %>",
- "version": "0.0.0",
- "main": "server/app.js",
- "dependencies": {
- "express": "^4.13.3",
- "morgan": "~1.6.1",
- "body-parser": "^1.13.3",
- "method-override": "^2.3.5",
- "cookie-parser": "^1.3.5",
- "express-session": "^1.11.3",
- "errorhandler": "^1.4.2",
- "compression": "^1.5.2",
- "composable-middleware": "^0.3.0",
- "lodash": "^3.10.1",
- "lusca": "^1.3.0",
- "babel-runtime": "^5.8.20",<% if (filters.jade) { %>
- "jade": "^1.11.0",<% } %><% if (filters.html) { %>
- "ejs": "^2.3.3",<% } %><% if (filters.mongoose) { %>
- "mongoose": "^4.1.2",
- "bluebird": "^2.9.34",
- "connect-mongo": "^0.8.1",<% } %><% if (filters.sequelize) { %>
- "sequelize": "^3.5.1",
- "sqlite3": "~3.0.2",
- "express-sequelize-session": "0.4.0",<% } %><% if (filters.auth) { %>
- "jsonwebtoken": "^5.0.0",
- "express-jwt": "^3.0.0",
- "passport": "~0.3.0",
- "passport-local": "^1.0.0",<% } %><% if (filters.facebookAuth) { %>
- "passport-facebook": "latest",<% } %><% if (filters.twitterAuth) { %>
- "passport-twitter": "latest",<% } %><% if (filters.googleAuth) { %>
- "passport-google-oauth": "latest",<% } %><% if (filters.socketio) { %>
- "socket.io": "^1.3.5",
- "socket.io-client": "^1.3.5",
- "socketio-jwt": "^4.2.0",<% } %>
- "serve-favicon": "^2.3.0"
- },
- "devDependencies": {
- "autoprefixer": "^6.0.0",
- "babel-core": "^5.6.4",
- "grunt": "~0.4.5",
- "grunt-wiredep": "^2.0.0",
- "grunt-concurrent": "^2.0.1",
- "grunt-contrib-clean": "^0.6.0",
- "grunt-contrib-concat": "^0.5.1",
- "grunt-contrib-copy": "^0.8.0",
- "grunt-contrib-cssmin": "^0.13.0",
- "grunt-contrib-imagemin": "^0.9.4",
- "grunt-contrib-jshint": "~0.11.2",
- "grunt-contrib-uglify": "^0.9.1",
- "grunt-contrib-watch": "~0.6.1",<% if (filters.jade) { %>
- "grunt-contrib-jade": "^0.15.0",<% } %><% if (filters.less) { %>
- "grunt-contrib-less": "^1.0.0",<% } %><% if(filters.babel) { %>
- "karma-babel-preprocessor": "^5.2.1",<% } %>
- "grunt-babel": "~5.0.0",
- "grunt-google-cdn": "~0.4.0",
- "grunt-jscs": "^2.0.0",
- "grunt-newer": "^1.1.1",
- "grunt-ng-annotate": "^1.0.1",
- "grunt-filerev": "^2.3.1",
- "grunt-usemin": "^3.0.0",
- "grunt-env": "~0.4.1",
- "grunt-node-inspector": "^0.2.0",
- "grunt-nodemon": "^0.4.0",
- "grunt-angular-templates": "^0.5.4",
- "grunt-dom-munger": "^3.4.0",
- "grunt-protractor-runner": "^2.0.0",
- "grunt-injector": "^0.6.0",
- "grunt-karma": "~0.12.0",
- "grunt-build-control": "^0.6.0",<% if(filters.sass) { %>
- "grunt-contrib-sass": "^0.9.0",<% } %><% if(filters.stylus) { %>
- "grunt-contrib-stylus": "latest",<% } %>
- "jit-grunt": "^0.9.1",
- "time-grunt": "^1.2.1",
- "grunt-express-server": "^0.5.1",
- "grunt-postcss": "^0.6.0",
- "grunt-open": "~0.2.3",
- "open": "~0.0.4",
- "jshint-stylish": "~2.0.1",
- "connect-livereload": "^0.5.3",
- "mocha": "^2.2.5",
- "grunt-mocha-test": "~0.12.7",
- "grunt-mocha-istanbul": "^3.0.1",
- "istanbul": "^0.3.17",
- "chai-as-promised": "^5.1.0",
- "chai-things": "^0.2.0",
- "sinon-chai": "^2.8.0",<% if (filters.mocha) { %>
- "karma-mocha": "^0.2.0",
- "karma-chai-plugins": "^0.6.0",<% } if (filters.jasmine) { %>
- "jasmine-core": "^2.3.4",
- "karma-jasmine": "~0.3.0",
- "jasmine-spec-reporter": "^2.4.0",<% } %>
- "karma-ng-scenario": "~0.1.0",
- "karma-firefox-launcher": "~0.1.6",
- "karma-script-launcher": "~0.1.0",
- "karma-html2js-preprocessor": "~0.1.0",
- "karma-ng-jade2js-preprocessor": "^0.2.0",
- "karma-chrome-launcher": "~0.2.0",
- "requirejs": "~2.1.11",
- "karma-requirejs": "~0.2.2",
- "karma-jade-preprocessor": "0.0.11",
- "karma-phantomjs-launcher": "~0.2.0",
- "karma": "~0.13.3",
- "karma-ng-html2js-preprocessor": "~0.1.2",
- "karma-spec-reporter": "~0.0.20",
- "proxyquire": "^1.0.1",
- "supertest": "^1.1.0"
- },
- "engines": {
- "node": ">=0.12.0"
- },
- "scripts": {
- "start": "node server",
- "test": "grunt test",
- "update-webdriver": "node node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update"
- },
- "private": true
-}
diff --git a/app/templates/client/.htaccess b/app/templates/client/.htaccess
deleted file mode 100644
index cb84cb918..000000000
--- a/app/templates/client/.htaccess
+++ /dev/null
@@ -1,543 +0,0 @@
-# Apache Configuration File
-
-# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
-# to the main server config file (usually called `httpd.conf`), you should add
-# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.
-
-# ##############################################################################
-# # CROSS-ORIGIN RESOURCE SHARING (CORS) #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Cross-domain AJAX requests |
-# ------------------------------------------------------------------------------
-
-# Enable cross-origin AJAX requests.
-# http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
-# http://enable-cors.org/
-
-#
-# Header set Access-Control-Allow-Origin "*"
-#
-
-# ------------------------------------------------------------------------------
-# | CORS-enabled images |
-# ------------------------------------------------------------------------------
-
-# Send the CORS header for images when browsers request it.
-# https://developer.mozilla.org/en/CORS_Enabled_Image
-# http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
-# http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
-
-
-
-
- SetEnvIf Origin ":" IS_CORS
- Header set Access-Control-Allow-Origin "*" env=IS_CORS
-
-
-
-
-# ------------------------------------------------------------------------------
-# | Web fonts access |
-# ------------------------------------------------------------------------------
-
-# Allow access from all domains for web fonts
-
-
-
- Header set Access-Control-Allow-Origin "*"
-
-
-
-
-# ##############################################################################
-# # ERRORS #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | 404 error prevention for non-existing redirected folders |
-# ------------------------------------------------------------------------------
-
-# Prevent Apache from returning a 404 error for a rewrite if a directory
-# with the same name does not exist.
-# http://httpd.apache.org/docs/current/content-negotiation.html#multiviews
-# http://www.webmasterworld.com/apache/3808792.htm
-
-Options -MultiViews
-
-# ------------------------------------------------------------------------------
-# | Custom error messages / pages |
-# ------------------------------------------------------------------------------
-
-# You can customize what Apache returns to the client in case of an error (see
-# http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.:
-
-ErrorDocument 404 /404.html
-
-
-# ##############################################################################
-# # INTERNET EXPLORER #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Better website experience |
-# ------------------------------------------------------------------------------
-
-# Force IE to render pages in the highest available mode in the various
-# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.
-
-
- Header set X-UA-Compatible "IE=edge"
- # `mod_headers` can't match based on the content-type, however, we only
- # want to send this header for HTML pages and not for the other resources
-
- Header unset X-UA-Compatible
-
-
-
-# ------------------------------------------------------------------------------
-# | Cookie setting from iframes |
-# ------------------------------------------------------------------------------
-
-# Allow cookies to be set from iframes in IE.
-
-#
-# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
-#
-
-# ------------------------------------------------------------------------------
-# | Screen flicker |
-# ------------------------------------------------------------------------------
-
-# Stop screen flicker in IE on CSS rollovers (this only works in
-# combination with the `ExpiresByType` directives for images from below).
-
-# BrowserMatch "MSIE" brokenvary=1
-# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
-# BrowserMatch "Opera" !brokenvary
-# SetEnvIf brokenvary 1 force-no-vary
-
-
-# ##############################################################################
-# # MIME TYPES AND ENCODING #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Proper MIME types for all files |
-# ------------------------------------------------------------------------------
-
-
-
- # Audio
- AddType audio/mp4 m4a f4a f4b
- AddType audio/ogg oga ogg
-
- # JavaScript
- # Normalize to standard type (it's sniffed in IE anyways):
- # http://tools.ietf.org/html/rfc4329#section-7.2
- AddType application/javascript js jsonp
- AddType application/json json
-
- # Video
- AddType video/mp4 mp4 m4v f4v f4p
- AddType video/ogg ogv
- AddType video/webm webm
- AddType video/x-flv flv
-
- # Web fonts
- AddType application/font-woff woff
- AddType application/vnd.ms-fontobject eot
-
- # Browsers usually ignore the font MIME types and sniff the content,
- # however, Chrome shows a warning if other MIME types are used for the
- # following fonts.
- AddType application/x-font-ttf ttc ttf
- AddType font/opentype otf
-
- # Make SVGZ fonts work on iPad:
- # https://twitter.com/FontSquirrel/status/14855840545
- AddType image/svg+xml svg svgz
- AddEncoding gzip svgz
-
- # Other
- AddType application/octet-stream safariextz
- AddType application/x-chrome-extension crx
- AddType application/x-opera-extension oex
- AddType application/x-shockwave-flash swf
- AddType application/x-web-app-manifest+json webapp
- AddType application/x-xpinstall xpi
- AddType application/xml atom rdf rss xml
- AddType image/webp webp
- AddType image/x-icon ico
- AddType text/cache-manifest appcache manifest
- AddType text/vtt vtt
- AddType text/x-component htc
- AddType text/x-vcard vcf
-
-
-
-# ------------------------------------------------------------------------------
-# | UTF-8 encoding |
-# ------------------------------------------------------------------------------
-
-# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
-AddDefaultCharset utf-8
-
-# Force UTF-8 for certain file formats.
-
- AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
-
-
-
-# ##############################################################################
-# # URL REWRITES #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Rewrite engine |
-# ------------------------------------------------------------------------------
-
-# Turning on the rewrite engine and enabling the `FollowSymLinks` option is
-# necessary for the following directives to work.
-
-# If your web host doesn't allow the `FollowSymlinks` option, you may need to
-# comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the
-# performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
-
-# Also, some cloud hosting services require `RewriteBase` to be set:
-# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site
-
-
- Options +FollowSymlinks
- # Options +SymLinksIfOwnerMatch
- RewriteEngine On
- # RewriteBase /
-
-
-# ------------------------------------------------------------------------------
-# | Suppressing / Forcing the "www." at the beginning of URLs |
-# ------------------------------------------------------------------------------
-
-# The same content should never be available under two different URLs especially
-# not with and without "www." at the beginning. This can cause SEO problems
-# (duplicate content), therefore, you should choose one of the alternatives and
-# redirect the other one.
-
-# By default option 1 (no "www.") is activated:
-# http://no-www.org/faq.php?q=class_b
-
-# If you'd prefer to use option 2, just comment out all the lines from option 1
-# and uncomment the ones from option 2.
-
-# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Option 1: rewrite www.example.com → example.com
-
-
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
-
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Option 2: rewrite example.com → www.example.com
-
-# Be aware that the following might not be a good idea if you use "real"
-# subdomains for certain parts of your website.
-
-#
-# RewriteCond %{HTTPS} !=on
-# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
-# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
-#
-
-
-# ##############################################################################
-# # SECURITY #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Content Security Policy (CSP) |
-# ------------------------------------------------------------------------------
-
-# You can mitigate the risk of cross-site scripting and other content-injection
-# attacks by setting a Content Security Policy which whitelists trusted sources
-# of content for your site.
-
-# The example header below allows ONLY scripts that are loaded from the current
-# site's origin (no inline scripts, no CDN, etc). This almost certainly won't
-# work as-is for your site!
-
-# To get all the details you'll need to craft a reasonable policy for your site,
-# read: http://html5rocks.com/en/tutorials/security/content-security-policy (or
-# see the specification: http://w3.org/TR/CSP).
-
-#
-# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
-#
-# Header unset Content-Security-Policy
-#
-#
-
-# ------------------------------------------------------------------------------
-# | File access |
-# ------------------------------------------------------------------------------
-
-# Block access to directories without a default document.
-# Usually you should leave this uncommented because you shouldn't allow anyone
-# to surf through every directory on your server (which may includes rather
-# private places like the CMS's directories).
-
-
- Options -Indexes
-
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Block access to hidden files and directories.
-# This includes directories used by version control systems such as Git and SVN.
-
-
- RewriteCond %{SCRIPT_FILENAME} -d [OR]
- RewriteCond %{SCRIPT_FILENAME} -f
- RewriteRule "(^|/)\." - [F]
-
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Block access to backup and source files.
-# These files may be left by some text editors and can pose a great security
-# danger when anyone has access to them.
-
-
- Order allow,deny
- Deny from all
- Satisfy All
-
-
-# ------------------------------------------------------------------------------
-# | Secure Sockets Layer (SSL) |
-# ------------------------------------------------------------------------------
-
-# Rewrite secure requests properly to prevent SSL certificate warnings, e.g.:
-# prevent `https://www.example.com` when your certificate only allows
-# `https://secure.example.com`.
-
-#
-# RewriteCond %{SERVER_PORT} !^443
-# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
-#
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-# Force client-side SSL redirection.
-
-# If a user types "example.com" in his browser, the above rule will redirect him
-# to the secure version of the site. That still leaves a window of opportunity
-# (the initial HTTP connection) for an attacker to downgrade or redirect the
-# request. The following header ensures that browser will ONLY connect to your
-# server via HTTPS, regardless of what the users type in the address bar.
-# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
-
-#
-# Header set Strict-Transport-Security max-age=16070400;
-#
-
-# ------------------------------------------------------------------------------
-# | Server software information |
-# ------------------------------------------------------------------------------
-
-# Avoid displaying the exact Apache version number, the description of the
-# generic OS-type and the information about Apache's compiled-in modules.
-
-# ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`!
-
-# ServerTokens Prod
-
-
-# ##############################################################################
-# # WEB PERFORMANCE #
-# ##############################################################################
-
-# ------------------------------------------------------------------------------
-# | Compression |
-# ------------------------------------------------------------------------------
-
-
-
- # Force compression for mangled headers.
- # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
-
-
- SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
- RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
-
-
-
- # Compress all output labeled with one of the following MIME-types
- # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
- # and can remove the `` and `` lines
- # as `AddOutputFilterByType` is still in the core directives).
-
- AddOutputFilterByType DEFLATE application/atom+xml \
- application/javascript \
- application/json \
- application/rss+xml \
- application/vnd.ms-fontobject \
- application/x-font-ttf \
- application/x-web-app-manifest+json \
- application/xhtml+xml \
- application/xml \
- font/opentype \
- image/svg+xml \
- image/x-icon \
- text/css \
- text/html \
- text/plain \
- text/x-component \
- text/xml
-
-
-
-
-# ------------------------------------------------------------------------------
-# | Content transformations |
-# ------------------------------------------------------------------------------
-
-# Prevent some of the mobile network providers from modifying the content of
-# your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5.
-
-#
-# Header set Cache-Control "no-transform"
-#
-
-# ------------------------------------------------------------------------------
-# | ETag removal |
-# ------------------------------------------------------------------------------
-
-# Since we're sending far-future expires headers (see below), ETags can
-# be removed: http://developer.yahoo.com/performance/rules.html#etags.
-
-# `FileETag None` is not enough for every server.
-
- Header unset ETag
-
-
-FileETag None
-
-# ------------------------------------------------------------------------------
-# | Expires headers (for better cache control) |
-# ------------------------------------------------------------------------------
-
-# The following expires headers are set pretty far in the future. If you don't
-# control versioning with filename-based cache busting, consider lowering the
-# cache time for resources like CSS and JS to something like 1 week.
-
-
-
- ExpiresActive on
- ExpiresDefault "access plus 1 month"
-
- # CSS
- ExpiresByType text/css "access plus 1 year"
-
- # Data interchange
- ExpiresByType application/json "access plus 0 seconds"
- ExpiresByType application/xml "access plus 0 seconds"
- ExpiresByType text/xml "access plus 0 seconds"
-
- # Favicon (cannot be renamed!)
- ExpiresByType image/x-icon "access plus 1 week"
-
- # HTML components (HTCs)
- ExpiresByType text/x-component "access plus 1 month"
-
- # HTML
- ExpiresByType text/html "access plus 0 seconds"
-
- # JavaScript
- ExpiresByType application/javascript "access plus 1 year"
-
- # Manifest files
- ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
- ExpiresByType text/cache-manifest "access plus 0 seconds"
-
- # Media
- ExpiresByType audio/ogg "access plus 1 month"
- ExpiresByType image/gif "access plus 1 month"
- ExpiresByType image/jpeg "access plus 1 month"
- ExpiresByType image/png "access plus 1 month"
- ExpiresByType video/mp4 "access plus 1 month"
- ExpiresByType video/ogg "access plus 1 month"
- ExpiresByType video/webm "access plus 1 month"
-
- # Web feeds
- ExpiresByType application/atom+xml "access plus 1 hour"
- ExpiresByType application/rss+xml "access plus 1 hour"
-
- # Web fonts
- ExpiresByType application/font-woff "access plus 1 month"
- ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
- ExpiresByType application/x-font-ttf "access plus 1 month"
- ExpiresByType font/opentype "access plus 1 month"
- ExpiresByType image/svg+xml "access plus 1 month"
-
-
-
-# ------------------------------------------------------------------------------
-# | Filename-based cache busting |
-# ------------------------------------------------------------------------------
-
-# If you're not using a build process to manage your filename version revving,
-# you might want to consider enabling the following directives to route all
-# requests such as `/css/style.12345.css` to `/css/style.css`.
-
-# To understand why this is important and a better idea than `*.css?v231`, read:
-# http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring
-
-#
-# RewriteCond %{REQUEST_FILENAME} !-f
-# RewriteCond %{REQUEST_FILENAME} !-d
-# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
-#
-
-# ------------------------------------------------------------------------------
-# | File concatenation |
-# ------------------------------------------------------------------------------
-
-# Allow concatenation from within specific CSS and JS files, e.g.:
-# Inside of `script.combined.js` you could have
-#
-#
-# and they would be included into this single file.
-
-#
-#
-# Options +Includes
-# AddOutputFilterByType INCLUDES application/javascript application/json
-# SetOutputFilter INCLUDES
-#
-#
-# Options +Includes
-# AddOutputFilterByType INCLUDES text/css
-# SetOutputFilter INCLUDES
-#
-#
-
-# ------------------------------------------------------------------------------
-# | Persistent connections |
-# ------------------------------------------------------------------------------
-
-# Allow multiple requests to be sent over the same TCP connection:
-# http://httpd.apache.org/docs/current/en/mod/core.html#keepalive.
-
-# Enable if you serve a lot of static content but, be aware of the
-# possible disadvantages!
-
-#
-# Header set Connection Keep-Alive
-#
diff --git a/app/templates/client/.jshintrc b/app/templates/client/.jshintrc
deleted file mode 100644
index 07b9d3793..000000000
--- a/app/templates/client/.jshintrc
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "node": true,
- "browser": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "undef": true,
- "unused": true,
- "strict": true,
- "trailing": true,
- "smarttabs": true,
- "globals": {
- "jQuery": true,
- "angular": true,
- "console": true,
- "$": true,
- "_": true,
- "moment": true,<% if (filters.jasmine) { %>
- "jasmine": true,<% } %>
- "describe": true,
- "beforeEach": true,
- "module": true,
- "inject": true,
- "it": true,
- "expect": true,
- "browser": true,
- "element": true,
- "by": true
- }
-}
diff --git a/app/templates/client/app/account(auth)/account(js).js b/app/templates/client/app/account(auth)/account(js).js
deleted file mode 100644
index d60fd72fe..000000000
--- a/app/templates/client/app/account(auth)/account(js).js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- <% if (filters.ngroute) { %>.config(function($routeProvider) {
- $routeProvider
- .when('/login', {
- templateUrl: 'app/account/login/login.html',
- controller: 'LoginCtrl'
- })
- .when('/logout', {
- name: 'logout',
- referrer: '/',
- template: '',
- controller: function($location, $route, Auth) {
- var referrer = $route.current.params.referrer ||
- $route.current.referrer ||
- '/';
- Auth.logout();
- $location.path(referrer);
- }
- })
- .when('/signup', {
- templateUrl: 'app/account/signup/signup.html',
- controller: 'SignupCtrl'
- })
- .when('/settings', {
- templateUrl: 'app/account/settings/settings.html',
- controller: 'SettingsCtrl',
- authenticate: true
- });
- })
- .run(function($rootScope) {
- $rootScope.$on('$routeChangeStart', function(event, next, current) {
- if (next.name === 'logout' && current && current.originalPath && !current.authenticate) {
- next.referrer = current.originalPath;
- }
- });
- });<% } %><% if (filters.uirouter) { %>.config(function($stateProvider) {
- $stateProvider
- .state('login', {
- url: '/login',
- templateUrl: 'app/account/login/login.html',
- controller: 'LoginCtrl'
- })
- .state('logout', {
- url: '/logout?referrer',
- referrer: 'main',
- template: '',
- controller: function($state, Auth) {
- var referrer = $state.params.referrer ||
- $state.current.referrer ||
- 'main';
- Auth.logout();
- $state.go(referrer);
- }
- })
- .state('signup', {
- url: '/signup',
- templateUrl: 'app/account/signup/signup.html',
- controller: 'SignupCtrl'
- })
- .state('settings', {
- url: '/settings',
- templateUrl: 'app/account/settings/settings.html',
- controller: 'SettingsCtrl',
- authenticate: true
- });
- })
- .run(function($rootScope) {
- $rootScope.$on('$stateChangeStart', function(event, next, nextParams, current) {
- if (next.name === 'logout' && current && current.name && !current.authenticate) {
- next.referrer = current.name;
- }
- });
- });<% } %>
diff --git a/app/templates/client/app/account(auth)/login/login(jade).jade b/app/templates/client/app/account(auth)/login/login(jade).jade
deleted file mode 100644
index 2352e8fad..000000000
--- a/app/templates/client/app/account(auth)/login/login(jade).jade
+++ /dev/null
@@ -1,46 +0,0 @@
-navbar
-.container
- .row
- .col-sm-12
- h1 Login
- p
- | Accounts are reset on server restart from
- code server/config/seed.js
- | . Default account is
- code test@example.com
- | /
- code test
- p
- | Admin account is
- code admin@example.com
- | /
- code admin
-
- .col-sm-12
- form.form(name='form', ng-submit='login(form)', novalidate='')
- .form-group
- label Email
- input.form-control(type='email', name='email', ng-model='user.email')
- .form-group
- label Password
- input.form-control(type='password', name='password', ng-model='user.password')
-
- .form-group.has-error
- p.help-block(ng-show='form.email.$error.required && form.password.$error.required && submitted')
- | Please enter your email and password.
- p.help-block {{ errors.other }}
-
- div
- button.btn.btn-inverse.btn-lg.btn-login(type='submit')
- | Login
- = ' '
- a.btn.btn-default.btn-lg.btn-register(<% if (filters.uirouter) { %>ui-sref='signup'<% } else { %>href='http://github.com/signup'<% } %>)
- | Register
-<% if (filters.oauth) {%>
- hr
-
- .row
- .col-sm-4.col-md-3
- oauth-buttons(classes='btn-block')
-<% } %>
- hr
diff --git a/app/templates/client/app/account(auth)/login/login.controller(js).js b/app/templates/client/app/account(auth)/login/login.controller(js).js
deleted file mode 100644
index 6e9d5fd7b..000000000
--- a/app/templates/client/app/account(auth)/login/login.controller(js).js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('LoginCtrl', function($scope, Auth<% if (filters.ngroute) { %>, $location<% } %><% if (filters.uirouter) { %>, $state<% } %>) {
- $scope.user = {};
- $scope.errors = {};
-
- $scope.login = function(form) {
- $scope.submitted = true;
-
- if (form.$valid) {
- Auth.login({
- email: $scope.user.email,
- password: $scope.user.password
- })
- .then(function() {
- // Logged in, redirect to home
- <% if (filters.ngroute) { %>$location.path('/');<% } %><% if (filters.uirouter) { %>$state.go('main');<% } %>
- })
- .catch(function(err) {
- $scope.errors.other = err.message;
- });
- }
- };
-
- });
diff --git a/app/templates/client/app/account(auth)/settings/settings(jade).jade b/app/templates/client/app/account(auth)/settings/settings(jade).jade
deleted file mode 100644
index 701215380..000000000
--- a/app/templates/client/app/account(auth)/settings/settings(jade).jade
+++ /dev/null
@@ -1,36 +0,0 @@
-navbar
-.container
- .row
- .col-sm-12
- h1 Change Password
- .col-sm-12
- form.form(name='form', ng-submit='changePassword(form)', novalidate='')
- .form-group
- label Current Password
- input.form-control(type='password'
- name='password'
- ng-model='user.oldPassword'
- mongoose-error='')
- p.help-block(ng-show='form.password.$error.mongoose')
- | {{ errors.other }}
- .form-group
- label New Password
- input.form-control(type='password'
- name='newPassword'
- ng-model='user.newPassword'
- ng-minlength='3', required='')
- p.help-block(ng-show='(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || submitted)')
- | Password must be at least 3 characters.
- .form-group
- label Confirm New Password
- input.form-control(type='password'
- name='confirmPassword'
- ng-model='user.confirmPassword'
- match="user.newPassword"
- ng-minlength='3', required='')
- p.help-block(ng-show='form.confirmPassword.$error.match && submitted')
- | Passwords must match.
-
- p.help-block {{ message }}
-
- button.btn.btn-lg.btn-primary(type='submit') Save changes
diff --git a/app/templates/client/app/account(auth)/settings/settings.controller(js).js b/app/templates/client/app/account(auth)/settings/settings.controller(js).js
deleted file mode 100644
index eeb1219cf..000000000
--- a/app/templates/client/app/account(auth)/settings/settings.controller(js).js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('SettingsCtrl', function($scope, User, Auth) {
- $scope.errors = {};
-
- $scope.changePassword = function(form) {
- $scope.submitted = true;
- if (form.$valid) {
- Auth.changePassword($scope.user.oldPassword, $scope.user.newPassword)
- .then(function() {
- $scope.message = 'Password successfully changed.';
- })
- .catch(function() {
- form.password.$setValidity('mongoose', false);
- $scope.errors.other = 'Incorrect password';
- $scope.message = '';
- });
- }
- };
- });
diff --git a/app/templates/client/app/account(auth)/signup/signup(html).html b/app/templates/client/app/account(auth)/signup/signup(html).html
deleted file mode 100644
index 84f4451e0..000000000
--- a/app/templates/client/app/account(auth)/signup/signup(html).html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
diff --git a/app/templates/client/app/account(auth)/signup/signup(jade).jade b/app/templates/client/app/account(auth)/signup/signup(jade).jade
deleted file mode 100644
index 139dd2941..000000000
--- a/app/templates/client/app/account(auth)/signup/signup(jade).jade
+++ /dev/null
@@ -1,63 +0,0 @@
-navbar
-.container
- .row
- .col-sm-12
- h1 Sign up
- .col-sm-12
- form.form(name='form', ng-submit='register(form)', novalidate='')
- .form-group(ng-class='{ "has-success": form.name.$valid && submitted,\
- "has-error": form.name.$invalid && submitted }')
- label Name
- input.form-control(type='text', name='name', ng-model='user.name', required='')
- p.help-block(ng-show='form.name.$error.required && submitted')
- | A name is required
-
- .form-group(ng-class='{ "has-success": form.email.$valid && submitted,\
- "has-error": form.email.$invalid && submitted }')
- label Email
- input.form-control(type='email', name='email', ng-model='user.email', required='', mongoose-error='')
- p.help-block(ng-show='form.email.$error.email && submitted')
- | Doesn't look like a valid email.
- p.help-block(ng-show='form.email.$error.required && submitted')
- | What's your email address?
- p.help-block(ng-show='form.email.$error.mongoose')
- | {{ errors.email }}
-
- .form-group(ng-class='{ "has-success": form.password.$valid && submitted,\
- "has-error": form.password.$invalid && submitted }')
- label Password
- input.form-control(type='password'
- name='password'
- ng-model='user.password'
- mongoose-error=''
- ng-minlength='3', required='')
- p.help-block(ng-show='(form.password.$error.minlength || form.password.$error.required) && submitted')
- | Password must be at least 3 characters.
- p.help-block(ng-show='form.password.$error.mongoose')
- | {{ errors.password }}
-
- .form-group(ng-class='{ "has-success": form.confirmPassword.$valid && submitted,\
- "has-error": form.confirmPassword.$invalid && submitted }')
- label Confirm Password
- input.form-control(type='password'
- name='confirmPassword'
- ng-model='user.confirmPassword'
- match="user.password"
- ng-minlength='3', required='')
- p.help-block(ng-show='form.confirmPassword.$error.match && submitted')
- | Passwords must match.
-
- div
- button.btn.btn-inverse.btn-lg.btn-register(type='submit')
- | Sign up
- = ' '
- a.btn.btn-default.btn-lg.btn-login(<% if (filters.uirouter) { %>ui-sref='login'<% } else { %>href='http://github.com/login'<% } %>)
- | Login
-<% if (filters.oauth) {%>
- hr
-
- .row
- .col-sm-4.col-md-3
- oauth-buttons(classes='btn-block')
-<% } %>
- hr
diff --git a/app/templates/client/app/account(auth)/signup/signup.controller(js).js b/app/templates/client/app/account(auth)/signup/signup.controller(js).js
deleted file mode 100644
index 405461a1f..000000000
--- a/app/templates/client/app/account(auth)/signup/signup.controller(js).js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('SignupCtrl', function($scope, Auth<% if (filters.ngroute) { %>, $location<% } %><% if (filters.uirouter) { %>, $state<% } %>) {
- $scope.user = {};
- $scope.errors = {};
-
- $scope.register = function(form) {
- $scope.submitted = true;
-
- if (form.$valid) {
- Auth.createUser({
- name: $scope.user.name,
- email: $scope.user.email,
- password: $scope.user.password
- })
- .then(function() {
- // Account created, redirect to home
- <% if (filters.ngroute) { %>$location.path('/');<% } %><% if (filters.uirouter) { %>$state.go('main');<% } %>
- })
- .catch(function(err) {
- err = err.data;
- $scope.errors = {};
-<% if (filters.mongooseModels) { %>
- // Update validity of form fields that match the mongoose errors
- angular.forEach(err.errors, function(error, field) {
- form[field].$setValidity('mongoose', false);
- $scope.errors[field] = error.message;
- });<% }
- if (filters.sequelizeModels) { %>
- // Update validity of form fields that match the sequelize errors
- if (err.name) {
- angular.forEach(err.fields, function(field) {
- form[field].$setValidity('mongoose', false);
- $scope.errors[field] = err.message;
- });
- }<% } %>
- });
- }
- };
-
- });
diff --git a/app/templates/client/app/admin(auth)/admin(css).css b/app/templates/client/app/admin(auth)/admin(css).css
deleted file mode 100644
index a6f536dc5..000000000
--- a/app/templates/client/app/admin(auth)/admin(css).css
+++ /dev/null
@@ -1 +0,0 @@
-.trash { color:rgb(209, 91, 71); }
diff --git a/app/templates/client/app/admin(auth)/admin(html).html b/app/templates/client/app/admin(auth)/admin(html).html
deleted file mode 100644
index 7688c9b47..000000000
--- a/app/templates/client/app/admin(auth)/admin(html).html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
The delete user and user index api routes are restricted to users with the 'admin' role.
-
- -
- {{user.name}}
- {{user.email}}
-
-
-
-
diff --git a/app/templates/client/app/admin(auth)/admin(jade).jade b/app/templates/client/app/admin(auth)/admin(jade).jade
deleted file mode 100644
index bcef64773..000000000
--- a/app/templates/client/app/admin(auth)/admin(jade).jade
+++ /dev/null
@@ -1,11 +0,0 @@
-navbar
-.container
- p
- | The delete user and user index api routes are restricted to users with the 'admin' role.
- ul.list-group
- li.list-group-item(ng-repeat='user in users')
- strong {{user.name}}
- br
- span.text-muted {{user.email}}
- a.trash(ng-click='delete(user)')
- span.glyphicon.glyphicon-trash.pull-right
diff --git a/app/templates/client/app/admin(auth)/admin(js).js b/app/templates/client/app/admin(auth)/admin(js).js
deleted file mode 100644
index f37ba9fcc..000000000
--- a/app/templates/client/app/admin(auth)/admin(js).js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- <% if (filters.ngroute) { %>.config(function($routeProvider) {
- $routeProvider
- .when('/admin', {
- templateUrl: 'app/admin/admin.html',
- controller: 'AdminCtrl'
- });
- });<% } %><% if (filters.uirouter) { %>.config(function($stateProvider) {
- $stateProvider
- .state('admin', {
- url: '/admin',
- templateUrl: 'app/admin/admin.html',
- controller: 'AdminCtrl'
- });
- });<% } %>
diff --git a/app/templates/client/app/admin(auth)/admin(less).less b/app/templates/client/app/admin(auth)/admin(less).less
deleted file mode 100644
index a6f536dc5..000000000
--- a/app/templates/client/app/admin(auth)/admin(less).less
+++ /dev/null
@@ -1 +0,0 @@
-.trash { color:rgb(209, 91, 71); }
diff --git a/app/templates/client/app/admin(auth)/admin(sass).scss b/app/templates/client/app/admin(auth)/admin(sass).scss
deleted file mode 100644
index a6f536dc5..000000000
--- a/app/templates/client/app/admin(auth)/admin(sass).scss
+++ /dev/null
@@ -1 +0,0 @@
-.trash { color:rgb(209, 91, 71); }
diff --git a/app/templates/client/app/admin(auth)/admin(stylus).styl b/app/templates/client/app/admin(auth)/admin(stylus).styl
deleted file mode 100644
index d7d50a172..000000000
--- a/app/templates/client/app/admin(auth)/admin(stylus).styl
+++ /dev/null
@@ -1,2 +0,0 @@
-.trash
- color rgb(209, 91, 71)
diff --git a/app/templates/client/app/admin(auth)/admin.controller(js).js b/app/templates/client/app/admin(auth)/admin.controller(js).js
deleted file mode 100644
index 3cbfd4b7f..000000000
--- a/app/templates/client/app/admin(auth)/admin.controller(js).js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('AdminCtrl', function($scope, $http, Auth, User) {
-
- // Use the User $resource to fetch all users
- $scope.users = User.query();
-
- $scope.delete = function(user) {
- User.remove({ id: user._id });
- $scope.users.splice(this.$index, 1);
- };
- });
diff --git a/app/templates/client/app/app(css).css b/app/templates/client/app/app(css).css
deleted file mode 100644
index 2dbd1e8c5..000000000
--- a/app/templates/client/app/app(css).css
+++ /dev/null
@@ -1,46 +0,0 @@
-<% if (filters.bootstrap) { %>
-/**
- * Bootstrap Fonts
- */
-
-@font-face {
- font-family: 'Glyphicons Halflings';
- src: url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot');
- src: url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
-}<% } %>
-
-/**
- *Font Awesome Fonts
- */
-
-@font-face {
- font-family: 'FontAwesome';
- src: url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0');
- src: url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-
-/**
- * App-wide Styles
- */
-
-.browserupgrade {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-<% if(!filters.bootstrap) { %>
-/* Responsive: Portrait tablets and up */
-@media screen and (min-width: 768px) {
- .container {
- max-width: 730px;
- }
-}<% } %>
diff --git a/app/templates/client/app/app(js).js b/app/templates/client/app/app(js).js
deleted file mode 100644
index 0c8ec39e8..000000000
--- a/app/templates/client/app/app(js).js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>', [<%- angularModules %>])
- <% if (filters.ngroute) { %>.config(function($routeProvider, $locationProvider<% if (filters.auth) { %>, $httpProvider<% } %>) {
- $routeProvider
- .otherwise({
- redirectTo: '/'
- });
-
- $locationProvider.html5Mode(true);<% if (filters.auth) { %>
- $httpProvider.interceptors.push('authInterceptor');<% } %>
- })<% } if (filters.uirouter) { %>.config(function($stateProvider, $urlRouterProvider, $locationProvider<% if (filters.auth) { %>, $httpProvider<% } %>) {
- $urlRouterProvider
- .otherwise('/');
-
- $locationProvider.html5Mode(true);<% if (filters.auth) { %>
- $httpProvider.interceptors.push('authInterceptor');<% } %>
- })<% } if (filters.auth) { %>
-
- .factory('authInterceptor', function($rootScope, $q, $cookies<% if (filters.ngroute) { %>, $location<% } if (filters.uirouter) { %>, $injector<% } %>) {
- <% if (filters.uirouter) { %>var state;
- <% } %>return {
- // Add authorization token to headers
- request: function(config) {
- config.headers = config.headers || {};
- if ($cookies.get('token')) {
- config.headers.Authorization = 'Bearer ' + $cookies.get('token');
- }
- return config;
- },
-
- // Intercept 401s and redirect you to login
- responseError: function(response) {
- if (response.status === 401) {
- <% if (filters.ngroute) { %>$location.path('/login');<% } if (filters.uirouter) { %>(state || (state = $injector.get('$state'))).go('login');<% } %>
- // remove any stale tokens
- $cookies.remove('token');
- return $q.reject(response);
- }
- else {
- return $q.reject(response);
- }
- }
- };
- })
-
- .run(function($rootScope<% if (filters.ngroute) { %>, $location<% } if (filters.uirouter) { %>, $state<% } %>, Auth) {
- // Redirect to login if route requires auth and the user is not logged in
- $rootScope.$on(<% if (filters.ngroute) { %>'$routeChangeStart'<% } %><% if (filters.uirouter) { %>'$stateChangeStart'<% } %>, function(event, next) {
- if (next.authenticate) {
- Auth.isLoggedIn(function(loggedIn) {
- if (!loggedIn) {
- event.preventDefault();
- <% if (filters.ngroute) { %>$location.path('/login');<% } if (filters.uirouter) { %>$state.go('login');<% } %>
- }
- });
- }
- });
- })<% } %>;
diff --git a/app/templates/client/app/app(less).less b/app/templates/client/app/app(less).less
deleted file mode 100644
index 9cfcfdb16..000000000
--- a/app/templates/client/app/app(less).less
+++ /dev/null
@@ -1,30 +0,0 @@
-<% if (filters.bootstrap) { %>@import 'http://github.com/bower_components/bootstrap/less/bootstrap.less';
-<% if(filters.oauth) { %>@import 'http://github.com/bower_components/bootstrap-social/bootstrap-social.less';
-<% }} %>@import 'http://github.com/bower_components/font-awesome/less/font-awesome.less';
-
-<% if (filters.bootstrap) { %>@icon-font-path: '../bower_components/bootstrap/fonts/';<% } %>
-@fa-font-path: '../bower_components/font-awesome/fonts';
-
-/**
- * App-wide Styles
- */
-
-.browserupgrade {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-<% if(!filters.bootstrap) { %>
-/* Responsive: Portrait tablets and up */
-@media screen and (min-width: 768px) {
- .container {
- max-width: 730px;
- }
-}
-<% } %>
-// injector
-@import 'http://github.com/account/login/login.less';
-@import 'http://github.com/admin/admin.less';
-@import 'http://github.com/main/main.less';
-// endinjector
diff --git a/app/templates/client/app/app(sass).scss b/app/templates/client/app/app(sass).scss
deleted file mode 100644
index e20f3f0ad..000000000
--- a/app/templates/client/app/app(sass).scss
+++ /dev/null
@@ -1,30 +0,0 @@
-<% if (filters.bootstrap) { %>$icon-font-path: "../bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/";
-@import 'http://github.com/bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap';
-<% if(filters.oauth) { %>@import 'http://github.com/bower_components/bootstrap-social/bootstrap-social.scss';
-<% }} %>$fa-font-path: "../bower_components/font-awesome/fonts";
-@import 'http://github.com/bower_components/font-awesome/scss/font-awesome';
-
-/**
- * App-wide Styles
- */
-
-.browserupgrade {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-<% if(!filters.bootstrap) { %>
-/* Responsive: Portrait tablets and up */
-@media screen and (min-width: 768px) {
- .container {
- max-width: 730px;
- }
-}
-<% } %>
-// Component styles are injected through grunt
-// injector
-@import 'http://github.com/account/login/login.scss';
-@import 'http://github.com/admin/admin.scss';
-@import 'http://github.com/main/main.scss';
-// endinjector
diff --git a/app/templates/client/app/app(stylus).styl b/app/templates/client/app/app(stylus).styl
deleted file mode 100644
index de156ca97..000000000
--- a/app/templates/client/app/app(stylus).styl
+++ /dev/null
@@ -1,51 +0,0 @@
-@import "http://github.com/bower_components/font-awesome/css/font-awesome.css"
-<% if (filters.bootstrap) { %>@import "http://github.com/bower_components/bootstrap/dist/css/bootstrap.css"
-<% if (filters.oauth) { %>@import "http://github.com/bower_components/bootstrap-social/bootstrap-social.css"
-<% } %>
-//
-// Bootstrap Fonts
-//
-
-@font-face
- font-family: 'Glyphicons Halflings'
- src: url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot')
- src: url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
- url('http://github.com/bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
-<% } %>
-//
-// Font Awesome Fonts
-//
-
-@font-face
- font-family: 'FontAwesome'
- src: url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0')
- src: url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),
- url('http://github.com/bower_components/font-awesome/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
- font-weight: normal
- font-style: normal
-
-//
-// App-wide Styles
-//
-
-.browserupgrade
- background #ccc
- color #000
- margin 0.2em 0
- padding 0.2em 0
-<% if(!filters.bootstrap) { %>
-// Responsive: Portrait tablets and up
-@media screen and (min-width: 768px)
- .container
- max-width 730px
-<% } %>
-// Component styles are injected through grunt
-// injector
-@import "http://github.com/account/login/login"
-@import "http://github.com/admin/admin"
-@import "http://github.com/main/main"
-// endinjector
diff --git a/app/templates/client/app/main/main(jade).jade b/app/templates/client/app/main/main(jade).jade
deleted file mode 100644
index 54d1d7e9c..000000000
--- a/app/templates/client/app/main/main(jade).jade
+++ /dev/null
@@ -1,26 +0,0 @@
-navbar
-
-header#banner.hero-unit
- .container
- h1 'Allo, 'Allo!
- p.lead Kick-start your next web app with Angular Fullstack
- img(src='http://github.com/assets/images/yeoman.png', alt='I\'m Yeoman')
-
-.container
- .row
- .col-lg-12
- h1.page-header Features:
- ul.nav.nav-tabs.nav-stacked.col-md-4.col-lg-4.col-sm-6(ng-repeat='thing in main.awesomeThings')
- li
- a(href='#', tooltip='{{thing.info}}')
- | {{thing.name}}<% if (filters.socketio) { %>
- button.close(type='button', ng-click='main.deleteThing(thing)') ×<% } %><% if (filters.socketio) { %>
-
- form.thing-form
- label Syncs in realtime across clients
- p.input-group
- input.form-control(type='text', placeholder='Add a new thing here.', ng-model='main.newThing')
- span.input-group-btn
- button.btn.btn-primary(type='submit', ng-click='main.addThing()') Add New<% } %>
-
-footer
diff --git a/app/templates/client/app/main/main(js).js b/app/templates/client/app/main/main(js).js
deleted file mode 100644
index 43206bce4..000000000
--- a/app/templates/client/app/main/main(js).js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- <% if (filters.ngroute) { %>.config(function($routeProvider) {
- $routeProvider
- .when('/', {
- templateUrl: 'app/main/main.html',
- controller: 'MainController',
- controllerAs: 'main'
- });
- });<% } %><% if (filters.uirouter) { %>.config(function($stateProvider) {
- $stateProvider
- .state('main', {
- url: '/',
- templateUrl: 'app/main/main.html',
- controller: 'MainController',
- controllerAs: 'main'
- });
- });<% } %>
diff --git a/app/templates/client/app/main/main.controller(js).js b/app/templates/client/app/main/main.controller(js).js
deleted file mode 100644
index 35fd95951..000000000
--- a/app/templates/client/app/main/main.controller(js).js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-(function() {
-
-function MainController($scope, $http<% if (filters.socketio) { %>, socket<% } %>) {
- var self = this;
- this.awesomeThings = [];
-
- $http.get('/api/things').then(function(response) {
- self.awesomeThings = response.data;<% if (filters.socketio) { %>
- socket.syncUpdates('thing', self.awesomeThings);<% } %>
- });
-<% if (filters.models) { %>
- this.addThing = function() {
- if (self.newThing === '') {
- return;
- }
- $http.post('/api/things', { name: self.newThing });
- self.newThing = '';
- };
-
- this.deleteThing = function(thing) {
- $http.delete('/api/things/' + thing._id);
- };<% } %><% if (filters.socketio) { %>
-
- $scope.$on('$destroy', function() {
- socket.unsyncUpdates('thing');
- });<% } %>
-}
-
-angular.module('<%= scriptAppName %>')
- .controller('MainController', MainController);
-
-})();
diff --git a/app/templates/client/app/main/main.controller.spec(js).js b/app/templates/client/app/main/main.controller.spec(js).js
deleted file mode 100644
index 42b1ea135..000000000
--- a/app/templates/client/app/main/main.controller.spec(js).js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-describe('Controller: MainController', function() {
-
- // load the controller's module
- beforeEach(module('<%= scriptAppName %>'));<% if (filters.uirouter) {%>
- beforeEach(module('stateMock'));<% } %><% if (filters.socketio) {%>
- beforeEach(module('socketMock'));<% } %>
-
- var scope;
- var MainController;<% if (filters.uirouter) {%>
- var state;<% } %>
- var $httpBackend;
-
- // Initialize the controller and a mock scope
- beforeEach(inject(function(_$httpBackend_, $controller, $rootScope<% if (filters.uirouter) {%>, $state<% } %>) {
- $httpBackend = _$httpBackend_;
- $httpBackend.expectGET('/api/things')
- .respond(['HTML5 Boilerplate', 'AngularJS', 'Karma', 'Express']);
-
- scope = $rootScope.$new();<% if (filters.uirouter) {%>
- state = $state;<% } %>
- MainController = $controller('MainController', {
- $scope: scope
- });
- }));
-
- it('should attach a list of things to the controller', function() {
- $httpBackend.flush();<% if (filters.jasmine) { %>
- expect(MainController.awesomeThings.length).toBe(4);<% } if (filters.mocha) { %>
- <%= expect() %>MainController.awesomeThings.length<%= to() %>.equal(4);<% } %>
- });
-});
diff --git a/app/templates/client/components/auth(auth)/auth.service(js).js b/app/templates/client/components/auth(auth)/auth.service(js).js
deleted file mode 100644
index 2a1fcb480..000000000
--- a/app/templates/client/components/auth(auth)/auth.service(js).js
+++ /dev/null
@@ -1,170 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .factory('Auth', function Auth($http, User, $cookies, $q) {
- /**
- * Return a callback or noop function
- *
- * @param {Function|*} cb - a 'potential' function
- * @return {Function}
- */
- var safeCb = function(cb) {
- return (angular.isFunction(cb)) ? cb : angular.noop;
- },
-
- currentUser = {};
-
- if ($cookies.get('token')) {
- currentUser = User.get();
- }
-
- return {
-
- /**
- * Authenticate user and save token
- *
- * @param {Object} user - login info
- * @param {Function} callback - optional, function(error, user)
- * @return {Promise}
- */
- login: function(user, callback) {
- return $http.post('/auth/local', {
- email: user.email,
- password: user.password
- })
- .then(function(res) {
- $cookies.put('token', res.data.token);
- currentUser = User.get();
- return currentUser.$promise;
- })
- .then(function(user) {
- safeCb(callback)(null, user);
- return user;
- })
- .catch(function(err) {
- this.logout();
- safeCb(callback)(err.data);
- return $q.reject(err.data);
- }.bind(this));
- },
-
- /**
- * Delete access token and user info
- */
- logout: function() {
- $cookies.remove('token');
- currentUser = {};
- },
-
- /**
- * Create a new user
- *
- * @param {Object} user - user info
- * @param {Function} callback - optional, function(error, user)
- * @return {Promise}
- */
- createUser: function(user, callback) {
- return User.save(user,
- function(data) {
- $cookies.put('token', data.token);
- currentUser = User.get();
- return safeCb(callback)(null, user);
- },
- function(err) {
- this.logout();
- return safeCb(callback)(err);
- }.bind(this)).$promise;
- },
-
- /**
- * Change password
- *
- * @param {String} oldPassword
- * @param {String} newPassword
- * @param {Function} callback - optional, function(error, user)
- * @return {Promise}
- */
- changePassword: function(oldPassword, newPassword, callback) {
- return User.changePassword({ id: currentUser._id }, {
- oldPassword: oldPassword,
- newPassword: newPassword
- }, function() {
- return safeCb(callback)(null);
- }, function(err) {
- return safeCb(callback)(err);
- }).$promise;
- },
-
- /**
- * Gets all available info on a user
- * (synchronous|asynchronous)
- *
- * @param {Function|*} callback - optional, funciton(user)
- * @return {Object|Promise}
- */
- getCurrentUser: function(callback) {
- if (arguments.length === 0) {
- return currentUser;
- }
-
- var value = (currentUser.hasOwnProperty('$promise')) ? currentUser.$promise : currentUser;
- return $q.when(value)
- .then(function(user) {
- safeCb(callback)(user);
- return user;
- }, function() {
- safeCb(callback)({});
- return {};
- });
- },
-
- /**
- * Check if a user is logged in
- * (synchronous|asynchronous)
- *
- * @param {Function|*} callback - optional, function(is)
- * @return {Bool|Promise}
- */
- isLoggedIn: function(callback) {
- if (arguments.length === 0) {
- return currentUser.hasOwnProperty('role');
- }
-
- return this.getCurrentUser(null)
- .then(function(user) {
- var is = user.hasOwnProperty('role');
- safeCb(callback)(is);
- return is;
- });
- },
-
- /**
- * Check if a user is an admin
- * (synchronous|asynchronous)
- *
- * @param {Function|*} callback - optional, function(is)
- * @return {Bool|Promise}
- */
- isAdmin: function(callback) {
- if (arguments.length === 0) {
- return currentUser.role === 'admin';
- }
-
- return this.getCurrentUser(null)
- .then(function(user) {
- var is = user.role === 'admin';
- safeCb(callback)(is);
- return is;
- });
- },
-
- /**
- * Get auth token
- *
- * @return {String} - a token string used for authenticating
- */
- getToken: function() {
- return $cookies.get('token');
- }
- };
- });
diff --git a/app/templates/client/components/auth(auth)/user.service(js).js b/app/templates/client/components/auth(auth)/user.service(js).js
deleted file mode 100644
index aad887945..000000000
--- a/app/templates/client/components/auth(auth)/user.service(js).js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .factory('User', function ($resource) {
- return $resource('/api/users/:id/:controller', {
- id: '@_id'
- },
- {
- changePassword: {
- method: 'PUT',
- params: {
- controller:'password'
- }
- },
- get: {
- method: 'GET',
- params: {
- id:'me'
- }
- }
- });
- });
diff --git a/app/templates/client/components/footer/footer(html).html b/app/templates/client/components/footer/footer(html).html
deleted file mode 100644
index 35225475d..000000000
--- a/app/templates/client/components/footer/footer(html).html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
Angular Fullstack v<%= rootGeneratorVersion() %> |
- @tyhenkel |
- Issues
-
-
diff --git a/app/templates/client/components/footer/footer(jade).jade b/app/templates/client/components/footer/footer(jade).jade
deleted file mode 100644
index 31c5ca960..000000000
--- a/app/templates/client/components/footer/footer(jade).jade
+++ /dev/null
@@ -1,7 +0,0 @@
-.container
- p
- | Angular Fullstack v<%= rootGeneratorVersion() %>
- = ' | '
- a(href='https://twitter.com/tyhenkel') @tyhenkel
- = ' | '
- a(href='https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open') Issues
diff --git a/app/templates/client/components/footer/footer.directive(js).js b/app/templates/client/components/footer/footer.directive(js).js
deleted file mode 100644
index a640e2289..000000000
--- a/app/templates/client/components/footer/footer.directive(js).js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .directive('footer', function () {
- return {
- templateUrl: 'components/footer/footer.html',
- restrict: 'E',
- link: function (scope, element) {
- element.addClass('footer');
- }
- };
- });
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(css).css b/app/templates/client/components/modal(uibootstrap)/modal(css).css
deleted file mode 100644
index ae0406856..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(css).css
+++ /dev/null
@@ -1,23 +0,0 @@
-.modal-primary .modal-header,
-.modal-info .modal-header,
-.modal-success .modal-header,
-.modal-warning .modal-header,
-.modal-danger .modal-header {
- color: #fff;
- border-radius: 5px 5px 0 0;
-}
-.modal-primary .modal-header {
- background: #428bca;
-}
-.modal-info .modal-header {
- background: #5bc0de;
-}
-.modal-success .modal-header {
- background: #5cb85c;
-}
-.modal-warning .modal-header {
- background: #f0ad4e;
-}
-.modal-danger .modal-header {
- background: #d9534f;
-}
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(html).html b/app/templates/client/components/modal(uibootstrap)/modal(html).html
deleted file mode 100644
index f04d0db03..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(html).html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(jade).jade b/app/templates/client/components/modal(uibootstrap)/modal(jade).jade
deleted file mode 100644
index 71b4321b3..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(jade).jade
+++ /dev/null
@@ -1,8 +0,0 @@
-.modal-header
- button.close(ng-if='modal.dismissable', type='button', ng-click='$dismiss()') ×
- h4.modal-title(ng-if='modal.title', ng-bind='modal.title')
-.modal-body
- p(ng-if='modal.text', ng-bind='modal.text')
- div(ng-if='modal.html', ng-bind-html='modal.html')
-.modal-footer
- button.btn(ng-repeat='button in modal.buttons', ng-class='button.classes', ng-click='button.click($event)', ng-bind='button.text')
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(less).less b/app/templates/client/components/modal(uibootstrap)/modal(less).less
deleted file mode 100644
index dd1357d2c..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(less).less
+++ /dev/null
@@ -1,25 +0,0 @@
-.modal-primary,
-.modal-info,
-.modal-success,
-.modal-warning,
-.modal-danger {
- .modal-header {
- color: #fff;
- border-radius: 5px 5px 0 0;
- }
-}
-.modal-primary .modal-header {
- background: @brand-primary;
-}
-.modal-info .modal-header {
- background: @brand-info;
-}
-.modal-success .modal-header {
- background: @brand-success;
-}
-.modal-warning .modal-header {
- background: @brand-warning;
-}
-.modal-danger .modal-header {
- background: @brand-danger;
-}
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(sass).scss b/app/templates/client/components/modal(uibootstrap)/modal(sass).scss
deleted file mode 100644
index 3b0b9d96a..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(sass).scss
+++ /dev/null
@@ -1,25 +0,0 @@
-.modal-primary,
-.modal-info,
-.modal-success,
-.modal-warning,
-.modal-danger {
- .modal-header {
- color: #fff;
- border-radius: 5px 5px 0 0;
- }
-}
-.modal-primary .modal-header {
- background: $brand-primary;
-}
-.modal-info .modal-header {
- background: $brand-info;
-}
-.modal-success .modal-header {
- background: $brand-success;
-}
-.modal-warning .modal-header {
- background: $brand-warning;
-}
-.modal-danger .modal-header {
- background: $brand-danger;
-}
diff --git a/app/templates/client/components/modal(uibootstrap)/modal(stylus).styl b/app/templates/client/components/modal(uibootstrap)/modal(stylus).styl
deleted file mode 100644
index d394ee047..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal(stylus).styl
+++ /dev/null
@@ -1,23 +0,0 @@
-.modal-primary
-.modal-info
-.modal-success
-.modal-warning
-.modal-danger
- .modal-header
- color #fff
- border-radius 5px 5px 0 0
-
-.modal-primary .modal-header
- background #428bca
-
-.modal-info .modal-header
- background #5bc0de
-
-.modal-success .modal-header
- background #5cb85c
-
-.modal-warning .modal-header
- background #f0ad4e
-
-.modal-danger .modal-header
- background #d9534f
diff --git a/app/templates/client/components/modal(uibootstrap)/modal.service(js).js b/app/templates/client/components/modal(uibootstrap)/modal.service(js).js
deleted file mode 100644
index 1de615d73..000000000
--- a/app/templates/client/components/modal(uibootstrap)/modal.service(js).js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .factory('Modal', function ($rootScope, $modal) {
- /**
- * Opens a modal
- * @param {Object} scope - an object to be merged with modal's scope
- * @param {String} modalClass - (optional) class(es) to be applied to the modal
- * @return {Object} - the instance $modal.open() returns
- */
- function openModal(scope, modalClass) {
- var modalScope = $rootScope.$new();
- scope = scope || {};
- modalClass = modalClass || 'modal-default';
-
- angular.extend(modalScope, scope);
-
- return $modal.open({
- templateUrl: 'components/modal/modal.html',
- windowClass: modalClass,
- scope: modalScope
- });
- }
-
- // Public API here
- return {
-
- /* Confirmation modals */
- confirm: {
-
- /**
- * Create a function to open a delete confirmation modal (ex. ng-click='myModalFn(name, arg1, arg2...)')
- * @param {Function} del - callback, ran when delete is confirmed
- * @return {Function} - the function to open the modal (ex. myModalFn)
- */
- delete: function(del) {
- del = del || angular.noop;
-
- /**
- * Open a delete confirmation modal
- * @param {String} name - name or info to show on modal
- * @param {All} - any additional args are passed straight to del callback
- */
- return function() {
- var args = Array.prototype.slice.call(arguments),
- name = args.shift(),
- deleteModal;
-
- deleteModal = openModal({
- modal: {
- dismissable: true,
- title: 'Confirm Delete',
- html: 'Are you sure you want to delete ' + name + ' ?
',
- buttons: [{
- classes: 'btn-danger',
- text: 'Delete',
- click: function(e) {
- deleteModal.close(e);
- }
- }, {
- classes: 'btn-default',
- text: 'Cancel',
- click: function(e) {
- deleteModal.dismiss(e);
- }
- }]
- }
- }, 'modal-danger');
-
- deleteModal.result.then(function(event) {
- del.apply(event, args);
- });
- };
- }
- }
- };
- });
diff --git a/app/templates/client/components/mongoose-error(auth)/mongoose-error.directive(js).js b/app/templates/client/components/mongoose-error(auth)/mongoose-error.directive(js).js
deleted file mode 100644
index a71cb03cf..000000000
--- a/app/templates/client/components/mongoose-error(auth)/mongoose-error.directive(js).js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-/**
- * Removes server error when user updates input
- */
-angular.module('<%= scriptAppName %>')
- .directive('mongooseError', function () {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attrs, ngModel) {
- element.on('keydown', function() {
- return ngModel.$setValidity('mongoose', true);
- });
- }
- };
- });
diff --git a/app/templates/client/components/navbar/navbar(html).html b/app/templates/client/components/navbar/navbar(html).html
deleted file mode 100644
index eda46b07a..000000000
--- a/app/templates/client/components/navbar/navbar(html).html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
<% if (filters.auth) { %>
-
-
<% } %>
-
-
-
diff --git a/app/templates/client/components/navbar/navbar(jade).jade b/app/templates/client/components/navbar/navbar(jade).jade
deleted file mode 100644
index a6f5fe919..000000000
--- a/app/templates/client/components/navbar/navbar(jade).jade
+++ /dev/null
@@ -1,34 +0,0 @@
-div.navbar.navbar-default.navbar-static-top(ng-controller='NavbarCtrl')
- div.container
- div.navbar-header
- button.navbar-toggle(type='button', ng-click='isCollapsed = !isCollapsed')
- span.sr-only Toggle navigation
- span.icon-bar
- span.icon-bar
- span.icon-bar
- a.navbar-brand(href='http://github.com/') <%= lodash.slugify(lodash.humanize(appname)) %>
-
- div#navbar-main.navbar-collapse.collapse(collapse='isCollapsed')
- ul.nav.navbar-nav
- li(ng-repeat='item in menu', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: isActive(item.link)}'<% } %>)
- a(<% if (filters.uirouter) { %>ui-sref='{{item.state}}'<% } else { %>ng-href='http://github.com/%7B%7Bitem.link%7D%7D'<% } %>) {{item.title}}<% if (filters.auth) { %>
-
- li(ng-show='isAdmin()', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: isActive("/admin")}'<% } %>)
- a(<% if (filters.uirouter) { %>ui-sref='admin'<% } else { %>href='http://github.com/admin'<% } %>) Admin
-
- ul.nav.navbar-nav.navbar-right
- li(ng-hide='isLoggedIn()', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: isActive("/signup")}'<% } %>)
- a(<% if (filters.uirouter) { %>ui-sref='signup'<% } else { %>href='http://github.com/signup'<% } %>) Sign up
-
- li(ng-hide='isLoggedIn()', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: isActive("/login")}'<% } %>)
- a(<% if (filters.uirouter) { %>ui-sref='login'<% } else { %>href='http://github.com/login'<% } %>) Login
-
- li(ng-show='isLoggedIn()')
- p.navbar-text Hello {{ getCurrentUser().name }}
-
- li(ng-show='isLoggedIn()', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: isActive("/settings")}'<% } %>)
- a(<% if (filters.uirouter) { %>ui-sref='settings'<% } else { %>href='http://github.com/settings'<% } %>)
- span.glyphicon.glyphicon-cog
-
- li(ng-show='isLoggedIn()')
- a(<% if (filters.uirouter) { %>ui-sref='logout'<% } else { %>href='http://github.com/logout'<% } %>) Logout<% } %>
diff --git a/app/templates/client/components/navbar/navbar.controller(js).js b/app/templates/client/components/navbar/navbar.controller(js).js
deleted file mode 100644
index b3eef7cf6..000000000
--- a/app/templates/client/components/navbar/navbar.controller(js).js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('NavbarCtrl', function ($scope<% if(!filters.uirouter) { %>, $location<% } %><% if (filters.auth) {%>, Auth<% } %>) {
- $scope.menu = [{
- 'title': 'Home',
- <% if (filters.uirouter) { %>'state': 'main'<% } else { %>'link': '/'<% } %>
- }];
-
- $scope.isCollapsed = true;<% if (filters.auth) {%>
- $scope.isLoggedIn = Auth.isLoggedIn;
- $scope.isAdmin = Auth.isAdmin;
- $scope.getCurrentUser = Auth.getCurrentUser;<% } %><% if(!filters.uirouter) { %>
-
- $scope.isActive = function(route) {
- return route === $location.path();
- };<% } %>
- });
diff --git a/app/templates/client/components/navbar/navbar.directive(js).js b/app/templates/client/components/navbar/navbar.directive(js).js
deleted file mode 100644
index 9153e6489..000000000
--- a/app/templates/client/components/navbar/navbar.directive(js).js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .directive('navbar', function () {
- return {
- templateUrl: 'components/navbar/navbar.html',
- restrict: 'E',
- controller: 'NavbarCtrl'
- };
- });
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(html).html b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(html).html
deleted file mode 100644
index 5ea19425f..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(html).html
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if(filters.facebookAuth) { %>
-
- Connect with Facebook
-
-<% } if (filters.googleAuth) { %>
-
- Connect with Google+
-
-<% } if (filters.twitterAuth) { %><% } %>
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(jade).jade b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(jade).jade
deleted file mode 100644
index fd5030bd7..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons(jade).jade
+++ /dev/null
@@ -1,14 +0,0 @@
-<% if(filters.facebookAuth) { %>a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-facebook(ng-class='classes'
- ng-click='OauthButtons.loginOauth("facebook")')
- i.fa.fa-facebook
- | Connect with Facebook
-
-<% } if(filters.googleAuth) { %>a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-google(ng-class='classes'
- ng-click='OauthButtons.loginOauth("google")')
- i.fa.fa-google-plus
- | Connect with Google+
-
-<% } if(filters.twitterAuth) { %>a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-twitter(ng-class='classes'
- ng-click='OauthButtons.loginOauth("twitter")')
- i.fa.fa-twitter
- | Connect with Twitter<% } %>
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller(js).js b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller(js).js
deleted file mode 100644
index 36d5d6467..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller(js).js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .controller('OauthButtonsCtrl', function($window) {
- this.loginOauth = function(provider) {
- $window.location.href = '/auth/' + provider;
- };
- });
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller.spec(js).js b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller.spec(js).js
deleted file mode 100644
index 144745e5e..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.controller.spec(js).js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-describe('Controller: OauthButtonsCtrl', function() {
-
- // load the controller's module
- beforeEach(module('<%= scriptAppName %>'));
-
- var OauthButtonsCtrl, $window;
-
- // Initialize the controller and a mock $window
- beforeEach(inject(function($controller) {
- $window = {
- location: {}
- };
-
- OauthButtonsCtrl = $controller('OauthButtonsCtrl', {
- $window: $window
- });
- }));
-
- it('should attach loginOauth', function() {<% if (filters.jasmine) { %>
- expect(OauthButtonsCtrl.loginOauth).toEqual(jasmine.any(Function));<% } if (filters.mocha) { %>
- <%= expect() %>OauthButtonsCtrl.loginOauth<%= to() %>.be.a('function');<% } %>
- });
-});
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive(js).js b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive(js).js
deleted file mode 100644
index 401f669e3..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive(js).js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .directive('oauthButtons', function() {
- return {
- templateUrl: 'components/oauth-buttons/oauth-buttons.html',
- restrict: 'EA',
- controller: 'OauthButtonsCtrl',
- controllerAs: 'OauthButtons',
- scope: {
- classes: '@'
- }
- };
- });
diff --git a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive.spec(js).js b/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive.spec(js).js
deleted file mode 100644
index 14682cc6e..000000000
--- a/app/templates/client/components/oauth-buttons(oauth)/oauth-buttons.directive.spec(js).js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-describe('Directive: oauthButtons', function() {
-
- // load the directive's module and view
- beforeEach(module('<%= scriptAppName %>'));
- beforeEach(module('components/oauth-buttons/oauth-buttons.html'));
-
- var element, parentScope, elementScope;
-
- var compileDirective = function(template) {
- inject(function($compile) {
- element = angular.element(template);
- element = $compile(element)(parentScope);
- parentScope.$digest();
- elementScope = element.isolateScope();
- });
- };
-
- beforeEach(inject(function($rootScope) {
- parentScope = $rootScope.$new();
- }));
-
- it('should contain anchor buttons', function() {
- compileDirective('');<% if (filters.jasmine) { %>
- expect(element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>').length).toBeGreaterThan(0);<% } if (filters.mocha) { %>
- <%= expect() %>element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>').length<%= to() %>.be.at.least(1);<% } %>
- });
-
- it('should evaluate and bind the classes attribute to scope.classes', function() {
- parentScope.scopedClass = 'scopedClass1';
- compileDirective('');<% if (filters.jasmine) { %>
- expect(elementScope.classes).toEqual('testClass1 scopedClass1');<% } if (filters.mocha) { %>
- <%= expect() %>elementScope.classes<%= to() %>.equal('testClass1 scopedClass1');<% } %>
- });
-
- it('should bind scope.classes to class names on the anchor buttons', function() {
- compileDirective('');
- // Add classes
- elementScope.classes = 'testClass1 testClass2';
- elementScope.$digest();<% if (filters.jasmine) { %>
- expect(element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.testClass1.testClass2').length).toBeGreaterThan(0);<% } if (filters.mocha) { %>
- <%= expect() %>element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.testClass1.testClass2').length<%= to() %>.be.at.least(1);<% } %>
-
- // Remove classes
- elementScope.classes = '';
- elementScope.$digest();<% if (filters.jasmine) { %>
- expect(element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.testClass1.testClass2').length).toEqual(0);<% } if (filters.mocha) { %>
- <%= expect() %>element.find('a.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.testClass1.testClass2').length<%= to() %>.equal(0);<% } %>
- });
-});
diff --git a/app/templates/client/components/socket(socketio)/socket.mock(js).js b/app/templates/client/components/socket(socketio)/socket.mock(js).js
deleted file mode 100644
index ba09c1d35..000000000
--- a/app/templates/client/components/socket(socketio)/socket.mock(js).js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-angular.module('socketMock', [])
- .factory('socket', function() {
- return {
- socket: {
- connect: function() {},
- on: function() {},
- emit: function() {},
- receive: function() {}
- },
-
- syncUpdates: function() {},
- unsyncUpdates: function() {}
- };
- });
diff --git a/app/templates/client/components/socket(socketio)/socket.service(js).js b/app/templates/client/components/socket(socketio)/socket.service(js).js
deleted file mode 100644
index 549f2d764..000000000
--- a/app/templates/client/components/socket(socketio)/socket.service(js).js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* global io */
-'use strict';
-
-angular.module('<%= scriptAppName %>')
- .factory('socket', function(socketFactory) {
-
- // socket.io now auto-configures its connection when we ommit a connection url
- var ioSocket = io('', {
- // Send auth token on connection, you will need to DI the Auth service above
- // 'query': 'token=' + Auth.getToken()
- path: '/socket.io-client'
- });
-
- var socket = socketFactory({
- ioSocket: ioSocket
- });
-
- return {
- socket: socket,
-
- /**
- * Register listeners to sync an array with updates on a model
- *
- * Takes the array we want to sync, the model name that socket updates are sent from,
- * and an optional callback function after new items are updated.
- *
- * @param {String} modelName
- * @param {Array} array
- * @param {Function} cb
- */
- syncUpdates: function (modelName, array, cb) {
- cb = cb || angular.noop;
-
- /**
- * Syncs item creation/updates on 'model:save'
- */
- socket.on(modelName + ':save', function (item) {
- var oldItem = _.find(array, {_id: item._id});
- var index = array.indexOf(oldItem);
- var event = 'created';
-
- // replace oldItem if it exists
- // otherwise just add item to the collection
- if (oldItem) {
- array.splice(index, 1, item);
- event = 'updated';
- } else {
- array.push(item);
- }
-
- cb(event, item, array);
- });
-
- /**
- * Syncs removed items on 'model:remove'
- */
- socket.on(modelName + ':remove', function (item) {
- var event = 'deleted';
- _.remove(array, {_id: item._id});
- cb(event, item, array);
- });
- },
-
- /**
- * Removes listeners for a models updates on the socket
- *
- * @param modelName
- */
- unsyncUpdates: function (modelName) {
- socket.removeAllListeners(modelName + ':save');
- socket.removeAllListeners(modelName + ':remove');
- }
- };
- });
diff --git a/app/templates/client/components/ui-router(uirouter)/ui-router.mock(js).js b/app/templates/client/components/ui-router(uirouter)/ui-router.mock(js).js
deleted file mode 100644
index a5a1bf413..000000000
--- a/app/templates/client/components/ui-router(uirouter)/ui-router.mock(js).js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-angular.module('stateMock', []);
-angular.module('stateMock').service('$state', function($q) {
- this.expectedTransitions = [];
-
- this.transitionTo = function(stateName) {
- if (this.expectedTransitions.length > 0) {
- var expectedState = this.expectedTransitions.shift();
- if (expectedState !== stateName) {
- throw Error('Expected transition to state: ' + expectedState + ' but transitioned to ' + stateName);
- }
- } else {
- throw Error('No more transitions were expected! Tried to transition to ' + stateName);
- }
- console.log('Mock transition to: ' + stateName);
- var deferred = $q.defer();
- var promise = deferred.promise;
- deferred.resolve();
- return promise;
- };
-
- this.go = this.transitionTo;
-
- this.expectTransitionTo = function(stateName) {
- this.expectedTransitions.push(stateName);
- };
-
- this.ensureAllTransitionsHappened = function() {
- if (this.expectedTransitions.length > 0) {
- throw Error('Not all transitions happened!');
- }
- };
-});
diff --git a/app/templates/client/index.html b/app/templates/client/index.html
deleted file mode 100644
index 1c8d00d8e..000000000
--- a/app/templates/client/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <% if (filters.ngroute) { %><% } %><% if (filters.uirouter) { %><% } %>
-
-
-
-
-
-
-
- <% if (filters.socketio) { %>
- <% } %>
-
-
-
-
-
-
-
-
diff --git a/app/templates/e2e/account(auth)/login/login.po.js b/app/templates/e2e/account(auth)/login/login.po.js
deleted file mode 100644
index 045204754..000000000
--- a/app/templates/e2e/account(auth)/login/login.po.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * This file uses the Page Object pattern to define the main page for tests
- * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
- */
-
-'use strict';
-
-var LoginPage = function() {
- var form = this.form = element(by.css('.form'));
- form.email = form.element(by.model('user.email'));
- form.password = form.element(by.model('user.password'));
- form.submit = form.element(by.css('.btn-login'));<% if (filters.oauth) { %>
- form.oauthButtons = require('../../components/oauth-buttons/oauth-buttons.po').oauthButtons;<% } %>
-
- this.login = function(data) {
- for (var prop in data) {
- var formElem = form[prop];
- if (data.hasOwnProperty(prop) && formElem && typeof formElem.sendKeys === 'function') {
- formElem.sendKeys(data[prop]);
- }
- }
-
- form.submit.click();
- };
-};
-
-module.exports = new LoginPage();
-
diff --git a/app/templates/e2e/account(auth)/login/login.spec(jasmine).js b/app/templates/e2e/account(auth)/login/login.spec(jasmine).js
deleted file mode 100644
index 6a65fc7cb..000000000
--- a/app/templates/e2e/account(auth)/login/login.spec(jasmine).js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Login View', function() {
- var page;
-
- var loadPage = function() {
- browser.get(config.baseUrl + '/login');
- page = require('./login.po');
- };
-
- var testUser = {
- name: 'Test User',
- email: 'test@example.com',
- password: 'test'
- };
-
- beforeEach(function(done) {
- <% if (filters.mongooseModels) { %>UserModel.removeAsync()<% }
- if (filters.sequelizeModels) { %>UserModel.destroy({ where: {} })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>return UserModel.createAsync(testUser);<% }
- if (filters.sequelizeModels) { %>return UserModel.create(testUser);<% } %>
- })
- .then(loadPage)
- .finally(done);
- });
-
- it('should include login form with correct inputs and submit button', function() {
- expect(page.form.email.getAttribute('type')).toBe('email');
- expect(page.form.email.getAttribute('name')).toBe('email');
- expect(page.form.password.getAttribute('type')).toBe('password');
- expect(page.form.password.getAttribute('name')).toBe('password');
- expect(page.form.submit.getAttribute('type')).toBe('submit');
- expect(page.form.submit.getText()).toBe('Login');
- });<% if (filters.oauth) { %>
-
- it('should include oauth buttons with correct classes applied', function() {<% if (filters.facebookAuth) { %>
- expect(page.form.oauthButtons.facebook.getText()).toBe('Connect with Facebook');
- expect(page.form.oauthButtons.facebook.getAttribute('class')).toMatch('btn-block');<% } if (filters.googleAuth) { %>
- expect(page.form.oauthButtons.google.getText()).toBe('Connect with Google+');
- expect(page.form.oauthButtons.google.getAttribute('class')).toMatch('btn-block');<% } if (filters.twitterAuth) { %>
- expect(page.form.oauthButtons.twitter.getText()).toBe('Connect with Twitter');
- expect(page.form.oauthButtons.twitter.getAttribute('class')).toMatch('btn-block');<% } %>
- });<% } %>
-
- describe('with local auth', function() {
-
- it('should login a user and redirecting to "/"', function() {
- page.login(testUser);
-
- var navbar = require('../../components/navbar/navbar.po');
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/');
- expect(navbar.navbarAccountGreeting.getText()).toBe('Hello ' + testUser.name);
- });
-
- it('should indicate login failures', function() {
- page.login({
- email: testUser.email,
- password: 'badPassword'
- });
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/login');
-
- var helpBlock = page.form.element(by.css('.form-group.has-error .help-block.ng-binding'));
- expect(helpBlock.getText()).toBe('This password is not correct.');
- });
-
- });
-});
diff --git a/app/templates/e2e/account(auth)/login/login.spec(mocha).js b/app/templates/e2e/account(auth)/login/login.spec(mocha).js
deleted file mode 100644
index 1fefea5d0..000000000
--- a/app/templates/e2e/account(auth)/login/login.spec(mocha).js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Login View', function() {
- var page;
-
- var loadPage = function() {
- browser.get(config.baseUrl + '/login');
- page = require('./login.po');
- };
-
- var testUser = {
- name: 'Test User',
- email: 'test@example.com',
- password: 'test'
- };
-
- before(function() {
- return UserModel
- <% if (filters.mongooseModels) { %>.removeAsync()<% }
- if (filters.sequelizeModels) { %>.destroy({ where: {} })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>return UserModel.createAsync(testUser);<% }
- if (filters.sequelizeModels) { %>return UserModel.create(testUser);<% } %>
- })
- .then(loadPage);
- });
-
- after(function() {
- <% if (filters.mongooseModels) { %>return UserModel.removeAsync();<% }
- if (filters.sequelizeModels) { %>return UserModel.destroy({ where: {} });<% } %>
- });
-
- it('should include login form with correct inputs and submit button', function() {
- <%= expect() %>page.form.email.getAttribute('type')<%= to() %>.eventually.equal('email');
- <%= expect() %>page.form.email.getAttribute('name')<%= to() %>.eventually.equal('email');
- <%= expect() %>page.form.password.getAttribute('type')<%= to() %>.eventually.equal('password');
- <%= expect() %>page.form.password.getAttribute('name')<%= to() %>.eventually.equal('password');
- <%= expect() %>page.form.submit.getAttribute('type')<%= to() %>.eventually.equal('submit');
- <%= expect() %>page.form.submit.getText()<%= to() %>.eventually.equal('Login');
- });<% if (filters.oauth) { %>
-
- it('should include oauth buttons with correct classes applied', function() {<% if (filters.facebookAuth) { %>
- <%= expect() %>page.form.oauthButtons.facebook.getText()<%= to() %>.eventually.equal('Connect with Facebook');
- <%= expect() %>page.form.oauthButtons.facebook.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } if (filters.googleAuth) { %>
- <%= expect() %>page.form.oauthButtons.google.getText()<%= to() %>.eventually.equal('Connect with Google+');
- <%= expect() %>page.form.oauthButtons.google.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } if (filters.twitterAuth) { %>
- <%= expect() %>page.form.oauthButtons.twitter.getText()<%= to() %>.eventually.equal('Connect with Twitter');
- <%= expect() %>page.form.oauthButtons.twitter.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } %>
- });<% } %>
-
- describe('with local auth', function() {
-
- it('should login a user and redirecting to "/"', function() {
- page.login(testUser);
-
- var navbar = require('../../components/navbar/navbar.po');
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/');
- <%= expect() %>navbar.navbarAccountGreeting.getText()<%= to() %>.eventually.equal('Hello ' + testUser.name);
- });
-
- describe('and invalid credentials', function() {
- before(function() {
- return loadPage();
- })
-
- it('should indicate login failures', function() {
- page.login({
- email: testUser.email,
- password: 'badPassword'
- });
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/login');
-
- var helpBlock = page.form.element(by.css('.form-group.has-error .help-block.ng-binding'));
- <%= expect() %>helpBlock.getText()<%= to() %>.eventually.equal('This password is not correct.');
- });
-
- });
-
- });
-});
diff --git a/app/templates/e2e/account(auth)/logout/logout.spec(jasmine).js b/app/templates/e2e/account(auth)/logout/logout.spec(jasmine).js
deleted file mode 100644
index 37c5e375a..000000000
--- a/app/templates/e2e/account(auth)/logout/logout.spec(jasmine).js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Logout View', function() {
- var login = function(user) {
- browser.get(config.baseUrl + '/login');
- require('../login/login.po').login(user);
- };
-
- var testUser = {
- name: 'Test User',
- email: 'test@example.com',
- password: 'test'
- };
-
- beforeEach(function(done) {
- <% if (filters.mongooseModels) { %>UserModel.removeAsync()<% }
- if (filters.sequelizeModels) { %>UserModel.destroy({ where: {} })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>return UserModel.createAsync(testUser);<% }
- if (filters.sequelizeModels) { %>return UserModel.create(testUser);<% } %>
- })
- .then(function() {
- return login(testUser);
- })
- .finally(done);
- });
-
- describe('with local auth', function() {
-
- it('should logout a user and redirecting to "/"', function() {
- var navbar = require('../../components/navbar/navbar.po');
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/');
- expect(navbar.navbarAccountGreeting.getText()).toBe('Hello ' + testUser.name);
-
- browser.get(config.baseUrl + '/logout');
-
- navbar = require('../../components/navbar/navbar.po');
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/');
- expect(navbar.navbarAccountGreeting.isDisplayed()).toBe(false);
- });
-
- });
-});
diff --git a/app/templates/e2e/account(auth)/logout/logout.spec(mocha).js b/app/templates/e2e/account(auth)/logout/logout.spec(mocha).js
deleted file mode 100644
index 0006306e0..000000000
--- a/app/templates/e2e/account(auth)/logout/logout.spec(mocha).js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Logout View', function() {
- var login = function(user) {
- browser.get(config.baseUrl + '/login');
- require('../login/login.po').login(user);
- };
-
- var testUser = {
- name: 'Test User',
- email: 'test@example.com',
- password: 'test'
- };
-
- beforeEach(function() {
- return UserModel
- <% if (filters.mongooseModels) { %>.removeAsync()<% }
- if (filters.sequelizeModels) { %>.destroy({ where: {} })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>return UserModel.createAsync(testUser);<% }
- if (filters.sequelizeModels) { %>return UserModel.create(testUser);<% } %>
- })
- .then(function() {
- return login(testUser);
- });
- });
-
- after(function() {
- <% if (filters.mongooseModels) { %>return UserModel.removeAsync();<% }
- if (filters.sequelizeModels) { %>return UserModel.destroy({ where: {} });<% } %>
- })
-
- describe('with local auth', function() {
-
- it('should logout a user and redirecting to "/"', function() {
- var navbar = require('../../components/navbar/navbar.po');
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/');
- <%= expect() %>navbar.navbarAccountGreeting.getText()<%= to() %>.eventually.equal('Hello ' + testUser.name);
-
- browser.get(config.baseUrl + '/logout');
-
- navbar = require('../../components/navbar/navbar.po');
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/');
- <%= expect() %>navbar.navbarAccountGreeting.isDisplayed()<%= to() %>.eventually.equal(false);
- });
-
- });
-});
diff --git a/app/templates/e2e/account(auth)/signup/signup.po.js b/app/templates/e2e/account(auth)/signup/signup.po.js
deleted file mode 100644
index 3a812266c..000000000
--- a/app/templates/e2e/account(auth)/signup/signup.po.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * This file uses the Page Object pattern to define the main page for tests
- * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
- */
-
-'use strict';
-
-var SignupPage = function() {
- var form = this.form = element(by.css('.form'));
- form.name = form.element(by.model('user.name'));
- form.email = form.element(by.model('user.email'));
- form.password = form.element(by.model('user.password'));
- form.confirmPassword = form.element(by.model('user.confirmPassword'));
- form.submit = form.element(by.css('.btn-register'));<% if (filters.oauth) { %>
- form.oauthButtons = require('../../components/oauth-buttons/oauth-buttons.po').oauthButtons;<% } %>
-
- this.signup = function(data) {
- for (var prop in data) {
- var formElem = form[prop];
- if (data.hasOwnProperty(prop) && formElem && typeof formElem.sendKeys === 'function') {
- formElem.sendKeys(data[prop]);
- }
- }
-
- form.submit.click();
- };
-};
-
-module.exports = new SignupPage();
-
diff --git a/app/templates/e2e/account(auth)/signup/signup.spec(jasmine).js b/app/templates/e2e/account(auth)/signup/signup.spec(jasmine).js
deleted file mode 100644
index 903c89817..000000000
--- a/app/templates/e2e/account(auth)/signup/signup.spec(jasmine).js
+++ /dev/null
@@ -1,76 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Signup View', function() {
- var page;
-
- var loadPage = function() {
- browser.manage().deleteAllCookies();
- browser.get(config.baseUrl + '/signup');
- page = require('./signup.po');
- };
-
- var testUser = {
- name: 'Test',
- email: 'test@example.com',
- password: 'test',
- confirmPassword: 'test'
- };
-
- beforeEach(function() {
- loadPage();
- });
-
- it('should include signup form with correct inputs and submit button', function() {
- expect(page.form.name.getAttribute('type')).toBe('text');
- expect(page.form.name.getAttribute('name')).toBe('name');
- expect(page.form.email.getAttribute('type')).toBe('email');
- expect(page.form.email.getAttribute('name')).toBe('email');
- expect(page.form.password.getAttribute('type')).toBe('password');
- expect(page.form.password.getAttribute('name')).toBe('password');
- expect(page.form.confirmPassword.getAttribute('type')).toBe('password');
- expect(page.form.confirmPassword.getAttribute('name')).toBe('confirmPassword');
- expect(page.form.submit.getAttribute('type')).toBe('submit');
- expect(page.form.submit.getText()).toBe('Sign up');
- });<% if (filters.oauth) { %>
-
- it('should include oauth buttons with correct classes applied', function() {<% if (filters.facebookAuth) { %>
- expect(page.form.oauthButtons.facebook.getText()).toBe('Connect with Facebook');
- expect(page.form.oauthButtons.facebook.getAttribute('class')).toMatch('btn-block');<% } if (filters.googleAuth) { %>
- expect(page.form.oauthButtons.google.getText()).toBe('Connect with Google+');
- expect(page.form.oauthButtons.google.getAttribute('class')).toMatch('btn-block');<% } if (filters.twitterAuth) { %>
- expect(page.form.oauthButtons.twitter.getText()).toBe('Connect with Twitter');
- expect(page.form.oauthButtons.twitter.getAttribute('class')).toMatch('btn-block');<% } %>
- });<% } %>
-
- describe('with local auth', function() {
-
- beforeAll(function(done) {
- <% if (filters.mongooseModels) { %>UserModel.removeAsync().then(done);<% }
- if (filters.sequelizeModels) { %>UserModel.destroy({ where: {} }).then(done);<% } %>
- });
-
- it('should signup a new user, log them in, and redirecting to "/"', function() {
- page.signup(testUser);
-
- var navbar = require('../../components/navbar/navbar.po');
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/');
- expect(navbar.navbarAccountGreeting.getText()).toBe('Hello ' + testUser.name);
- });
-
- it('should indicate signup failures', function() {
- page.signup(testUser);
-
- expect(browser.getCurrentUrl()).toBe(config.baseUrl + '/signup');
- expect(page.form.email.getAttribute('class')).toContain('ng-invalid-mongoose');
-
- var helpBlock = page.form.element(by.css('.form-group.has-error .help-block.ng-binding'));
- expect(helpBlock.getText()).toBe('The specified email address is already in use.');
- });
-
- });
-});
diff --git a/app/templates/e2e/account(auth)/signup/signup.spec(mocha).js b/app/templates/e2e/account(auth)/signup/signup.spec(mocha).js
deleted file mode 100644
index 7578d2796..000000000
--- a/app/templates/e2e/account(auth)/signup/signup.spec(mocha).js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict';
-
-var config = browser.params;<% if (filters.mongooseModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/api/user/user.model');<% } %><% if (filters.sequelizeModels) { %>
-var UserModel = require(config.serverConfig.root + '/server/sqldb').User;<% } %>
-
-describe('Signup View', function() {
- var page;
-
- var loadPage = function() {
- browser.manage().deleteAllCookies()
- browser.get(config.baseUrl + '/signup');
- page = require('./signup.po');
- };
-
- var testUser = {
- name: 'Test',
- email: 'test@example.com',
- password: 'test',
- confirmPassword: 'test'
- };
-
- before(function() {
- return loadPage();
- });
-
- after(function() {
- <% if (filters.mongooseModels) { %>return UserModel.removeAsync();<% }
- if (filters.sequelizeModels) { %>return UserModel.destroy({ where: {} });<% } %>
- });
-
- it('should include signup form with correct inputs and submit button', function() {
- <%= expect() %>page.form.name.getAttribute('type')<%= to() %>.eventually.equal('text');
- <%= expect() %>page.form.name.getAttribute('name')<%= to() %>.eventually.equal('name');
- <%= expect() %>page.form.email.getAttribute('type')<%= to() %>.eventually.equal('email');
- <%= expect() %>page.form.email.getAttribute('name')<%= to() %>.eventually.equal('email');
- <%= expect() %>page.form.password.getAttribute('type')<%= to() %>.eventually.equal('password');
- <%= expect() %>page.form.password.getAttribute('name')<%= to() %>.eventually.equal('password');
- <%= expect() %>page.form.confirmPassword.getAttribute('type')<%= to() %>.eventually.equal('password');
- <%= expect() %>page.form.confirmPassword.getAttribute('name')<%= to() %>.eventually.equal('confirmPassword');
- <%= expect() %>page.form.submit.getAttribute('type')<%= to() %>.eventually.equal('submit');
- <%= expect() %>page.form.submit.getText()<%= to() %>.eventually.equal('Sign up');
- });<% if (filters.oauth) { %>
-
- it('should include oauth buttons with correct classes applied', function() {<% if (filters.facebookAuth) { %>
- <%= expect() %>page.form.oauthButtons.facebook.getText()<%= to() %>.eventually.equal('Connect with Facebook');
- <%= expect() %>page.form.oauthButtons.facebook.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } if (filters.googleAuth) { %>
- <%= expect() %>page.form.oauthButtons.google.getText()<%= to() %>.eventually.equal('Connect with Google+');
- <%= expect() %>page.form.oauthButtons.google.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } if (filters.twitterAuth) { %>
- <%= expect() %>page.form.oauthButtons.twitter.getText()<%= to() %>.eventually.equal('Connect with Twitter');
- <%= expect() %>page.form.oauthButtons.twitter.getAttribute('class')<%= to() %>.eventually.contain('btn-block');<% } %>
- });<% } %>
-
- describe('with local auth', function() {
-
- before(function() {
- <% if (filters.mongooseModels) { %>return UserModel.removeAsync();<% }
- if (filters.sequelizeModels) { %>return UserModel.destroy({ where: {} });<% } %>
- })
-
- it('should signup a new user, log them in, and redirecting to "/"', function() {
- page.signup(testUser);
-
- var navbar = require('../../components/navbar/navbar.po');
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/');
- <%= expect() %>navbar.navbarAccountGreeting.getText()<%= to() %>.eventually.equal('Hello ' + testUser.name);
- });
-
- describe('and invalid credentials', function() {
- before(function() {
- return loadPage();
- });
-
- it('should indicate signup failures', function() {
- page.signup(testUser);
-
- <%= expect() %>browser.getCurrentUrl()<%= to() %>.eventually.equal(config.baseUrl + '/signup');
- <%= expect() %>page.form.email.getAttribute('class')<%= to() %>.eventually.contain('ng-invalid-mongoose');
-
- var helpBlock = page.form.element(by.css('.form-group.has-error .help-block.ng-binding'));
- <%= expect() %>helpBlock.getText()<%= to() %>.eventually.equal('The specified email address is already in use.');
- });
-
- });
-
- });
-});
diff --git a/app/templates/e2e/components/navbar/navbar.po.js b/app/templates/e2e/components/navbar/navbar.po.js
deleted file mode 100644
index 80a48418e..000000000
--- a/app/templates/e2e/components/navbar/navbar.po.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * This file uses the Page Object pattern to define the main page for tests
- * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
- */
-
-'use strict';
-
-var NavbarComponent = function() {
- this.navbar = element(by.css('.navbar'));
- this.navbarHeader = this.navbar.element(by.css('.navbar-header'));
- this.navbarNav = this.navbar.element(by.css('#navbar-main .nav.navbar-nav:not(.navbar-right)'));<% if (filters.auth) { %>
- this.navbarAccount = this.navbar.element(by.css('#navbar-main .nav.navbar-nav.navbar-right'));
- this.navbarAccountGreeting = this.navbarAccount.element(by.binding('getCurrentUser().name'));<% } %>
-};
-
-module.exports = new NavbarComponent();
diff --git a/app/templates/e2e/components/oauth-buttons(oauth)/oauth-buttons.po.js b/app/templates/e2e/components/oauth-buttons(oauth)/oauth-buttons.po.js
deleted file mode 100644
index c25d2b994..000000000
--- a/app/templates/e2e/components/oauth-buttons(oauth)/oauth-buttons.po.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * This file uses the Page Object pattern to define the main page for tests
- * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
- */
-
-'use strict';
-
-var OauthButtons = function() {
- var oauthButtons = this.oauthButtons = element(by.css('oauth-buttons'));<% if (filters.facebookAuth) { %>
- oauthButtons.facebook = oauthButtons.element(by.css('.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-facebook'));<% } if (filters.googleAuth) { %>
- oauthButtons.google = oauthButtons.element(by.css('.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-google'));<% } if (filters.twitterAuth) { %>
- oauthButtons.twitter = oauthButtons.element(by.css('.btn<% if (filters.bootstrap) { %>.btn-social<% } %>.btn-twitter'));<% } %>
-};
-
-module.exports = new OauthButtons();
diff --git a/app/templates/e2e/main/main.po.js b/app/templates/e2e/main/main.po.js
deleted file mode 100644
index 6718608c7..000000000
--- a/app/templates/e2e/main/main.po.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * This file uses the Page Object pattern to define the main page for tests
- * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
- */
-
-'use strict';
-
-var MainPage = function() {
- this.heroEl = element(by.css('.hero-unit'));
- this.h1El = this.heroEl.element(by.css('h1'));
- this.imgEl = this.heroEl.element(by.css('img'));
-};
-
-module.exports = new MainPage();
-
diff --git a/app/templates/e2e/main/main.spec(jasmine).js b/app/templates/e2e/main/main.spec(jasmine).js
deleted file mode 100644
index 57284495a..000000000
--- a/app/templates/e2e/main/main.spec(jasmine).js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var config = browser.params;
-
-describe('Main View', function() {
- var page;
-
- beforeEach(function() {
- browser.get(config.baseUrl + '/');
- page = require('./main.po');
- });
-
- it('should include jumbotron with correct data', function() {
- expect(page.h1El.getText()).toBe('\'Allo, \'Allo!');
- expect(page.imgEl.getAttribute('src')).toMatch(/yeoman.png$/);
- expect(page.imgEl.getAttribute('alt')).toBe('I\'m Yeoman');
- });
-});
diff --git a/app/templates/e2e/main/main.spec(mocha).js b/app/templates/e2e/main/main.spec(mocha).js
deleted file mode 100644
index d497443cd..000000000
--- a/app/templates/e2e/main/main.spec(mocha).js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-var config = browser.params;
-
-describe('Main View', function() {
- var page;
-
- beforeEach(function() {
- browser.get(config.baseUrl + '/');
- page = require('./main.po');
- });
-
- it('should include jumbotron with correct data', function() {
- <%= expect() %>page.h1El.getText()<%= to() %>.eventually.equal('\'Allo, \'Allo!');
- <%= expect() %>page.imgEl.getAttribute('src')<%= to() %>.eventually.match(/yeoman.png$/);
- <%= expect() %>page.imgEl.getAttribute('alt')<%= to() %>.eventually.equal('I\'m Yeoman');
- });
-});
diff --git a/app/templates/server/.jshintrc b/app/templates/server/.jshintrc
deleted file mode 100644
index 69f3b00e3..000000000
--- a/app/templates/server/.jshintrc
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "expr": true,
- "node": true,
- "esnext": true,
- "bitwise": true,
- "eqeqeq": true,
- "immed": true,
- "latedef": "nofunc",
- "newcap": true,
- "noarg": true,
- "undef": true,
- "smarttabs": true,
- "asi": true,
- "debug": true
-}
diff --git a/app/templates/server/.jshintrc-spec b/app/templates/server/.jshintrc-spec
deleted file mode 100644
index 8c9871ce0..000000000
--- a/app/templates/server/.jshintrc-spec
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "extends": ".jshintrc",
- "globals": {<% if (filters.jasmine) { %>
- "jasmine": true,<% } %>
- "describe": true,
- "it": true,
- "before": true,
- "beforeEach": true,
- "after": true,
- "afterEach": true,
- "expect": true,
- "assert": true,
- "sinon": true
- }
-}
diff --git a/app/templates/server/api/user(auth)/index.spec.js b/app/templates/server/api/user(auth)/index.spec.js
deleted file mode 100644
index 18d39989d..000000000
--- a/app/templates/server/api/user(auth)/index.spec.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict';
-
-var proxyquire = require('proxyquire').noPreserveCache();
-
-var userCtrlStub = {
- index: 'userCtrl.index',
- destroy: 'userCtrl.destroy',
- me: 'userCtrl.me',
- changePassword: 'userCtrl.changePassword',
- show: 'userCtrl.show',
- create: 'userCtrl.create'
-};
-
-var authServiceStub = {
- isAuthenticated: function() {
- return 'authService.isAuthenticated';
- },
- hasRole: function(role) {
- return 'authService.hasRole.' + role;
- }
-};
-
-var routerStub = {
- get: sinon.spy(),
- put: sinon.spy(),
- post: sinon.spy(),
- delete: sinon.spy()
-};
-
-// require the index with our stubbed out modules
-var userIndex = proxyquire('./index', {
- 'express': {
- Router: function() {
- return routerStub;
- }
- },
- './user.controller': userCtrlStub,
- '../../auth/auth.service': authServiceStub
-});
-
-describe('User API Router:', function() {
-
- it('should return an express router instance', function() {
- <%= expect() %>userIndex<%= to() %>.equal(routerStub);
- });
-
- describe('GET /api/users', function() {
-
- it('should verify admin role and route to user.controller.index', function() {
- <%= expect() %>routerStub.get
- .withArgs('/', 'authService.hasRole.admin', 'userCtrl.index')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
- describe('DELETE /api/users/:id', function() {
-
- it('should verify admin role and route to user.controller.destroy', function() {
- <%= expect() %>routerStub.delete
- .withArgs('/:id', 'authService.hasRole.admin', 'userCtrl.destroy')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
- describe('GET /api/users/me', function() {
-
- it('should be authenticated and route to user.controller.me', function() {
- <%= expect() %>routerStub.get
- .withArgs('/me', 'authService.isAuthenticated', 'userCtrl.me')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
- describe('PUT /api/users/:id/password', function() {
-
- it('should be authenticated and route to user.controller.changePassword', function() {
- <%= expect() %>routerStub.put
- .withArgs('/:id/password', 'authService.isAuthenticated', 'userCtrl.changePassword')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
- describe('GET /api/users/:id', function() {
-
- it('should be authenticated and route to user.controller.show', function() {
- <%= expect() %>routerStub.get
- .withArgs('/:id', 'authService.isAuthenticated', 'userCtrl.show')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
- describe('POST /api/users', function() {
-
- it('should route to user.controller.create', function() {
- <%= expect() %>routerStub.post
- .withArgs('/', 'userCtrl.create')
- <%= to() %>.have.been.calledOnce;
- });
-
- });
-
-});
diff --git a/app/templates/server/api/user(auth)/user.controller.js b/app/templates/server/api/user(auth)/user.controller.js
deleted file mode 100644
index ad30b5b3b..000000000
--- a/app/templates/server/api/user(auth)/user.controller.js
+++ /dev/null
@@ -1,173 +0,0 @@
-'use strict';
-<% if (filters.mongooseModels) { %>
-import User from './user.model';<% } %><% if (filters.sequelizeModels) { %>
-import {User} from '../../sqldb';<% } %>
-import passport from 'passport';
-import config from '../../config/environment';
-import jwt from 'jsonwebtoken';
-
-function validationError(res, statusCode) {
- statusCode = statusCode || 422;
- return function(err) {
- res.status(statusCode).json(err);
- }
-}
-
-function handleError(res, statusCode) {
- statusCode = statusCode || 500;
- return function(err) {
- res.status(statusCode).send(err);
- };
-}
-
-function respondWith(res, statusCode) {
- statusCode = statusCode || 200;
- return function() {
- res.status(statusCode).end();
- };
-}
-
-/**
- * Get list of users
- * restriction: 'admin'
- */
-exports.index = function(req, res) {
- <% if (filters.mongooseModels) { %>User.findAsync({}, '-salt -hashedPassword')<% }
- if (filters.sequelizeModels) { %>User.findAll({
- attributes: [
- '_id',
- 'name',
- 'email',
- 'role',
- 'provider'
- ]
- })<% } %>
- .then(function(users) {
- res.status(200).json(users);
- })
- .catch(handleError(res));
-};
-
-/**
- * Creates a new user
- */
-exports.create = function(req, res, next) {
- <% if (filters.mongooseModels) { %>var newUser = new User(req.body);
- newUser.provider = 'local';
- newUser.role = 'user';
- newUser.saveAsync()<% }
- if (filters.sequelizeModels) { %>var newUser = User.build(req.body);
- newUser.setDataValue('provider', 'local');
- newUser.setDataValue('role', 'user');
- newUser.save()<% } %>
- <% if (filters.mongooseModels) { %>.spread(function(user) {<% }
- if (filters.sequelizeModels) { %>.then(function(user) {<% } %>
- var token = jwt.sign({ _id: user._id }, config.secrets.session, {
- expiresInMinutes: 60 * 5
- });
- res.json({ token: token });
- })
- .catch(validationError(res));
-};
-
-/**
- * Get a single user
- */
-exports.show = function(req, res, next) {
- var userId = req.params.id;
-
- <% if (filters.mongooseModels) { %>User.findByIdAsync(userId)<% }
- if (filters.sequelizeModels) { %>User.find({
- where: {
- _id: userId
- }
- })<% } %>
- .then(function(user) {
- if (!user) {
- return res.status(404).end();
- }
- res.json(user.profile);
- })
- .catch(function(err) {
- return next(err);
- });
-};
-
-/**
- * Deletes a user
- * restriction: 'admin'
- */
-exports.destroy = function(req, res) {
- <% if (filters.mongooseModels) { %>User.findByIdAndRemoveAsync(req.params.id)<% }
- if (filters.sequelizeModels) { %>User.destroy({ _id: req.params.id })<% } %>
- .then(function() {
- res.status(204).end();
- })
- .catch(handleError(res));
-};
-
-/**
- * Change a users password
- */
-exports.changePassword = function(req, res, next) {
- var userId = req.user._id;
- var oldPass = String(req.body.oldPassword);
- var newPass = String(req.body.newPassword);
-
- <% if (filters.mongooseModels) { %>User.findByIdAsync(userId)<% }
- if (filters.sequelizeModels) { %>User.find({
- where: {
- _id: userId
- }
- })<% } %>
- .then(function(user) {
- if (user.authenticate(oldPass)) {
- user.password = newPass;
- <% if (filters.mongooseModels) { %>return user.saveAsync()<% }
- if (filters.sequelizeModels) { %>return user.save()<% } %>
- .then(function() {
- res.status(204).end();
- })
- .catch(validationError(res));
- } else {
- return res.status(403).end();
- }
- });
-};
-
-/**
- * Get my info
- */
-exports.me = function(req, res, next) {
- var userId = req.user._id;
-
- <% if (filters.mongooseModels) { %>User.findOneAsync({ _id: userId }, '-salt -hashedPassword')<% }
- if (filters.sequelizeModels) { %>User.find({
- where: {
- _id: userId
- },
- attributes: [
- '_id',
- 'name',
- 'email',
- 'role',
- 'provider'
- ]
- })<% } %>
- .then(function(user) { // don't ever give out the password or salt
- if (!user) {
- return res.status(401).end();
- }
- res.json(user);
- })
- .catch(function(err) {
- return next(err);
- });
-};
-
-/**
- * Authentication callback
- */
-exports.authCallback = function(req, res, next) {
- res.redirect('/');
-};
diff --git a/app/templates/server/api/user(auth)/user.events.js b/app/templates/server/api/user(auth)/user.events.js
deleted file mode 100644
index 42137933d..000000000
--- a/app/templates/server/api/user(auth)/user.events.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * User model events
- */
-
-'use strict';
-
-import {EventEmitter} from 'events';<% if (filters.mongooseModels) { %>
-import User from './user.model';<% } if (filters.sequelizeModels) { %>
-import {User} from '../../sqldb';<% } %>
-var UserEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserEvents.setMaxListeners(0);
-
-// Model events<% if (filters.mongooseModels) { %>
-var events = {
- 'save': 'save',
- 'remove': 'remove'
-};<% } if (filters.sequelizeModels) { %>
-var events = {
- 'afterCreate': 'save',
- 'afterUpdate': 'save',
- 'afterDestroy': 'remove'
-};<% } %>
-
-// Register the event emitter to the model events
-for (var e in events) {
- var event = events[e];<% if (filters.mongooseModels) { %>
- User.schema.post(e, emitEvent(event));<% } if (filters.sequelizeModels) { %>
- User.hook(e, emitEvent(event));<% } %>
-}
-
-function emitEvent(event) {
- return function(doc<% if (filters.sequelizeModels) { %>, options, done<% } %>) {
- UserEvents.emit(event + ':' + doc._id, doc);
- UserEvents.emit(event, doc);<% if (filters.sequelizeModels) { %>
- done(null);<% } %>
- }
-}
-
-module.exports = UserEvents;
diff --git a/app/templates/server/api/user(auth)/user.integration.js b/app/templates/server/api/user(auth)/user.integration.js
deleted file mode 100644
index 5c7c652b3..000000000
--- a/app/templates/server/api/user(auth)/user.integration.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-
-import app from '../..';<% if (filters.mongooseModels) { %>
-import User from './user.model';<% } %><% if (filters.sequelizeModels) { %>
-import {User} from '../../sqldb';<% } %>
-import request from 'supertest';
-
-describe('User API:', function() {
- var user;
-
- // Clear users before testing
- before(function() {
- return <% if (filters.mongooseModels) { %>User.removeAsync().then(function() {<% }
- if (filters.sequelizeModels) { %>User.destroy({ where: {} }).then(function() {<% } %>
- <% if (filters.mongooseModels) { %>user = new User({<% }
- if (filters.sequelizeModels) { %>user = User.build({<% } %>
- name: 'Fake User',
- email: 'test@example.com',
- password: 'password'
- });
-
- return <% if (filters.mongooseModels) { %>user.saveAsync();<% }
- if (filters.sequelizeModels) { %>user.save();<% } %>
- });
- });
-
- // Clear users after testing
- after(function() {
- <% if (filters.mongooseModels) { %>return User.removeAsync();<% }
- if (filters.sequelizeModels) { %>return User.destroy({ where: {} });<% } %>
- });
-
- describe('GET /api/users/me', function() {
- var token;
-
- before(function(done) {
- request(app)
- .post('/auth/local')
- .send({
- email: 'test@example.com',
- password: 'password'
- })
- .expect(200)
- .expect('Content-Type', /json/)
- .end(function(err, res) {
- token = res.body.token;
- done();
- });
- });
-
- it('should respond with a user profile when authenticated', function(done) {
- request(app)
- .get('/api/users/me')
- .set('authorization', 'Bearer ' + token)
- .expect(200)
- .expect('Content-Type', /json/)
- .end(function(err, res) {
- <%= expect() %>res.body._id.toString()<%= to() %>.equal(user._id.toString());
- done();
- });
- });
-
- it('should respond with a 401 when not authenticated', function(done) {
- request(app)
- .get('/api/users/me')
- .expect(401)
- .end(done);
- });
- });
-});
diff --git a/app/templates/server/api/user(auth)/user.model(mongooseModels).js b/app/templates/server/api/user(auth)/user.model(mongooseModels).js
deleted file mode 100644
index e97da090f..000000000
--- a/app/templates/server/api/user(auth)/user.model(mongooseModels).js
+++ /dev/null
@@ -1,228 +0,0 @@
-'use strict';
-
-import crypto from 'crypto';
-var mongoose = require('bluebird').promisifyAll(require('mongoose'));
-var Schema = mongoose.Schema;<% if (filters.oauth) { %>
-var authTypes = ['github', 'twitter', 'facebook', 'google'];<% } %>
-
-var UserSchema = new Schema({
- name: String,
- email: {
- type: String,
- lowercase: true
- },
- role: {
- type: String,
- default: 'user'
- },
- password: String,
- provider: String,
- salt: String<% if (filters.oauth) { %>,<% if (filters.facebookAuth) { %>
- facebook: {},<% } %><% if (filters.twitterAuth) { %>
- twitter: {},<% } %><% if (filters.googleAuth) { %>
- google: {},<% } %>
- github: {}<% } %>
-});
-
-/**
- * Virtuals
- */
-
-// Public profile information
-UserSchema
- .virtual('profile')
- .get(function() {
- return {
- 'name': this.name,
- 'role': this.role
- };
- });
-
-// Non-sensitive info we'll be putting in the token
-UserSchema
- .virtual('token')
- .get(function() {
- return {
- '_id': this._id,
- 'role': this.role
- };
- });
-
-/**
- * Validations
- */
-
-// Validate empty email
-UserSchema
- .path('email')
- .validate(function(email) {<% if (filters.oauth) { %>
- if (authTypes.indexOf(this.provider) !== -1) {
- return true;
- }<% } %>
- return email.length;
- }, 'Email cannot be blank');
-
-// Validate empty password
-UserSchema
- .path('password')
- .validate(function(password) {<% if (filters.oauth) { %>
- if (authTypes.indexOf(this.provider) !== -1) {
- return true;
- }<% } %>
- return password.length;
- }, 'Password cannot be blank');
-
-// Validate email is not taken
-UserSchema
- .path('email')
- .validate(function(value, respond) {
- var self = this;
- return this.constructor.findOneAsync({ email: value })
- .then(function(user) {
- if (user) {
- if (self.id === user.id) {
- return respond(true);
- }
- return respond(false);
- }
- return respond(true);
- })
- .catch(function(err) {
- throw err;
- });
- }, 'The specified email address is already in use.');
-
-var validatePresenceOf = function(value) {
- return value && value.length;
-};
-
-/**
- * Pre-save hook
- */
-UserSchema
- .pre('save', function(next) {
- // Handle new/update passwords
- if (this.isModified('password')) {
- if (!validatePresenceOf(this.password)<% if (filters.oauth) { %> && authTypes.indexOf(this.provider) === -1<% } %>) {
- next(new Error('Invalid password'));
- }
-
- // Make salt with a callback
- var _this = this;
- this.makeSalt(function(saltErr, salt) {
- if (saltErr) {
- next(saltErr);
- }
- _this.salt = salt;
- _this.encryptPassword(_this.password, function(encryptErr, hashedPassword) {
- if (encryptErr) {
- next(encryptErr);
- }
- _this.password = hashedPassword;
- next();
- });
- });
- } else {
- next();
- }
- });
-
-/**
- * Methods
- */
-UserSchema.methods = {
- /**
- * Authenticate - check if the passwords are the same
- *
- * @param {String} password
- * @param {Function} callback
- * @return {Boolean}
- * @api public
- */
- authenticate: function(password, callback) {
- if (!callback) {
- return this.password === this.encryptPassword(password);
- }
-
- var _this = this;
- this.encryptPassword(password, function(err, pwdGen) {
- if (err) {
- callback(err);
- }
-
- if (_this.password === pwdGen) {
- callback(null, true);
- }
- else {
- callback(null, false);
- }
- });
- },
-
- /**
- * Make salt
- *
- * @param {Number} byteSize Optional salt byte size, default to 16
- * @param {Function} callback
- * @return {String}
- * @api public
- */
- makeSalt: function(byteSize, callback) {
- var defaultByteSize = 16;
-
- if (typeof arguments[0] === 'function') {
- callback = arguments[0];
- byteSize = defaultByteSize;
- }
- else if (typeof arguments[1] === 'function') {
- callback = arguments[1];
- }
-
- if (!byteSize) {
- byteSize = defaultByteSize;
- }
-
- if (!callback) {
- return crypto.randomBytes(byteSize).toString('base64');
- }
-
- return crypto.randomBytes(byteSize, function(err, salt) {
- if (err) {
- callback(err);
- }
- return callback(null, salt.toString('base64'));
- });
- },
-
- /**
- * Encrypt password
- *
- * @param {String} password
- * @param {Function} callback
- * @return {String}
- * @api public
- */
- encryptPassword: function(password, callback) {
- if (!password || !this.salt) {
- return null;
- }
-
- var defaultIterations = 10000;
- var defaultKeyLength = 64;
- var salt = new Buffer(this.salt, 'base64');
-
- if (!callback) {
- return crypto.pbkdf2Sync(password, salt, defaultIterations, defaultKeyLength)
- .toString('base64');
- }
-
- return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, function(err, key) {
- if (err) {
- callback(err);
- }
- return callback(null, key.toString('base64'));
- });
- }
-};
-
-module.exports = mongoose.model('User', UserSchema);
diff --git a/app/templates/server/api/user(auth)/user.model(sequelizeModels).js b/app/templates/server/api/user(auth)/user.model(sequelizeModels).js
deleted file mode 100644
index 500f6b81f..000000000
--- a/app/templates/server/api/user(auth)/user.model(sequelizeModels).js
+++ /dev/null
@@ -1,236 +0,0 @@
-'use strict';
-
-import crypto from 'crypto';<% if (filters.oauth) { %>
-var authTypes = ['github', 'twitter', 'facebook', 'google'];<% } %>
-
-var validatePresenceOf = function(value) {
- return value && value.length;
-};
-
-module.exports = function(sequelize, DataTypes) {
- var User = sequelize.define('User', {
-
- _id: {
- type: DataTypes.INTEGER,
- allowNull: false,
- primaryKey: true,
- autoIncrement: true
- },
- name: DataTypes.STRING,
- email: {
- type: DataTypes.STRING,
- unique: {
- msg: 'The specified email address is already in use.'
- },
- validate: {
- isEmail: true
- }
- },
- role: {
- type: DataTypes.STRING,
- defaultValue: 'user'
- },
- password: {
- type: DataTypes.STRING,
- validate: {
- notEmpty: true
- }
- },
- provider: DataTypes.STRING,
- salt: DataTypes.STRING<% if (filters.oauth) { %>,<% if (filters.facebookAuth) { %>
- facebook: DataTypes.TEXT,<% } %><% if (filters.twitterAuth) { %>
- twitter: DataTypes.TEXT,<% } %><% if (filters.googleAuth) { %>
- google: DataTypes.TEXT,<% } %>
- github: DataTypes.TEXT<% } %>
-
- }, {
-
- /**
- * Virtual Getters
- */
- getterMethods: {
- // Public profile information
- profile: function() {
- return {
- 'name': this.name,
- 'role': this.role
- };
- },
-
- // Non-sensitive info we'll be putting in the token
- token: function() {
- return {
- '_id': this._id,
- 'role': this.role
- };
- }
- },
-
- /**
- * Pre-save hooks
- */
- hooks: {
- beforeBulkCreate: function(users, fields, fn) {
- var totalUpdated = 0;
- users.forEach(function(user) {
- user.updatePassword(function(err) {
- if (err) {
- return fn(err);
- }
- totalUpdated += 1;
- if (totalUpdated === users.length) {
- return fn();
- }
- });
- });
- },
- beforeCreate: function(user, fields, fn) {
- user.updatePassword(fn);
- },
- beforeUpdate: function(user, fields, fn) {
- if (user.changed('password')) {
- return user.updatePassword(fn);
- }
- fn();
- }
- },
-
- /**
- * Instance Methods
- */
- instanceMethods: {
- /**
- * Authenticate - check if the passwords are the same
- *
- * @param {String} password
- * @param {Function} callback
- * @return {Boolean}
- * @api public
- */
- authenticate: function(password, callback) {
- if (!callback) {
- return this.password === this.encryptPassword(password);
- }
-
- var _this = this;
- this.encryptPassword(password, function(err, pwdGen) {
- if (err) {
- callback(err);
- }
-
- if (_this.password === pwdGen) {
- callback(null, true);
- }
- else {
- callback(null, false);
- }
- });
- },
-
- /**
- * Make salt
- *
- * @param {Number} byteSize Optional salt byte size, default to 16
- * @param {Function} callback
- * @return {String}
- * @api public
- */
- makeSalt: function(byteSize, callback) {
- var defaultByteSize = 16;
-
- if (typeof arguments[0] === 'function') {
- callback = arguments[0];
- byteSize = defaultByteSize;
- }
- else if (typeof arguments[1] === 'function') {
- callback = arguments[1];
- }
-
- if (!byteSize) {
- byteSize = defaultByteSize;
- }
-
- if (!callback) {
- return crypto.randomBytes(byteSize).toString('base64');
- }
-
- return crypto.randomBytes(byteSize, function(err, salt) {
- if (err) {
- callback(err);
- }
- return callback(null, salt.toString('base64'));
- });
- },
-
- /**
- * Encrypt password
- *
- * @param {String} password
- * @param {Function} callback
- * @return {String}
- * @api public
- */
- encryptPassword: function(password, callback) {
- if (!password || !this.salt) {
- if (!callback) {
- return null;
- }
- return callback(null);
- }
-
- var defaultIterations = 10000;
- var defaultKeyLength = 64;
- var salt = new Buffer(this.salt, 'base64');
-
- if (!callback) {
- return crypto.pbkdf2Sync(password, salt, defaultIterations, defaultKeyLength)
- .toString('base64');
- }
-
- return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength,
- function(err, key) {
- if (err) {
- callback(err);
- }
- return callback(null, key.toString('base64'));
- });
- },
-
- /**
- * Update password field
- *
- * @param {Function} fn
- * @return {String}
- * @api public
- */
- updatePassword: function(fn) {
- // Handle new/update passwords
- if (this.password) {
- if (!validatePresenceOf(this.password)<% if (filters.oauth) { %> && authTypes.indexOf(this.provider) === -1<% } %>) {
- fn(new Error('Invalid password'));
- }
-
- // Make salt with a callback
- var _this = this;
- this.makeSalt(function(saltErr, salt) {
- if (saltErr) {
- fn(saltErr);
- }
- _this.salt = salt;
- _this.encryptPassword(_this.password, function(encryptErr, hashedPassword) {
- if (encryptErr) {
- fn(encryptErr);
- }
- _this.password = hashedPassword;
- fn(null);
- });
- });
- } else {
- fn(null);
- }
- }
- }
- });
-
- return User;
-};
diff --git a/app/templates/server/api/user(auth)/user.model.spec(mongooseModels).js b/app/templates/server/api/user(auth)/user.model.spec(mongooseModels).js
deleted file mode 100644
index 4cff951fd..000000000
--- a/app/templates/server/api/user(auth)/user.model.spec(mongooseModels).js
+++ /dev/null
@@ -1,72 +0,0 @@
-'use strict';
-
-import app from '../..';
-import User from './user.model';
-var user;
-var genUser = function() {
- user = new User({
- provider: 'local',
- name: 'Fake User',
- email: 'test@example.com',
- password: 'password'
- });
- return user;
-};
-
-describe('User Model', function() {
- before(function() {
- // Clear users before testing
- return User.removeAsync();
- });
-
- beforeEach(function() {
- genUser();
- });
-
- afterEach(function() {
- return User.removeAsync();
- });
-
- it('should begin with no users', function() {
- return <%= expect() %>User.findAsync({})<%= to() %>
- .eventually.have.length(0);
- });
-
- it('should fail when saving a duplicate user', function() {
- return <%= expect() %>user.saveAsync()
- .then(function() {
- var userDup = genUser();
- return userDup.saveAsync();
- })<%= to() %>.be.rejected;
- });
-
- describe('#email', function() {
- it('should fail when saving without an email', function() {
- user.email = '';
- return <%= expect() %>user.saveAsync()<%= to() %>.be.rejected;
- });
- });
-
- describe('#password', function() {
- beforeEach(function() {
- return user.saveAsync();
- });
-
- it('should authenticate user if valid', function() {
- <%= expect() %>user.authenticate('password')<%= to() %>.be.true;
- });
-
- it('should not authenticate user if invalid', function() {
- <%= expect() %>user.authenticate('blah')<%= to() %>.not.be.true;
- });
-
- it('should remain the same hash unless the password is updated', function() {
- user.name = 'Test User';
- return <%= expect() %>user.saveAsync()
- .spread(function(u) {
- return u.authenticate('password');
- })<%= to() %>.eventually.be.true;
- });
- });
-
-});
diff --git a/app/templates/server/api/user(auth)/user.model.spec(sequelizeModels).js b/app/templates/server/api/user(auth)/user.model.spec(sequelizeModels).js
deleted file mode 100644
index ec4196a03..000000000
--- a/app/templates/server/api/user(auth)/user.model.spec(sequelizeModels).js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-import app from '../..';
-import {User} from '../../sqldb';
-var user;
-var genUser = function() {
- user = User.build({
- provider: 'local',
- name: 'Fake User',
- email: 'test@example.com',
- password: 'password'
- });
- return user;
-};
-
-describe('User Model', function() {
- before(function() {
- // Sync and clear users before testing
- return User.sync().then(function() {
- return User.destroy({ where: {} });
- });
- });
-
- beforeEach(function() {
- genUser();
- });
-
- afterEach(function() {
- return User.destroy({ where: {} });
- });
-
- it('should begin with no users', function() {
- return <%= expect() %>User.findAll()<%= to() %>
- .eventually.have.length(0);
- });
-
- it('should fail when saving a duplicate user', function() {
- return <%= expect() %>user.save()
- .then(function() {
- var userDup = genUser();
- return userDup.save();
- })<%= to() %>.be.rejected;
- });
-
- describe('#email', function() {
- it('should fail when saving without an email', function() {
- user.email = '';
- return <%= expect() %>user.save()<%= to() %>.be.rejected;
- });
- });
-
- describe('#password', function() {
- beforeEach(function() {
- return user.save();
- });
-
- it('should authenticate user if valid', function() {
- <%= expect() %>user.authenticate('password')<%= to() %>.be.true;
- });
-
- it('should not authenticate user if invalid', function() {
- <%= expect() %>user.authenticate('blah')<%= to() %>.not.be.true;
- });
-
- it('should remain the same hash unless the password is updated', function() {
- user.name = 'Test User';
- return <%= expect() %>user.save()
- .then(function(u) {
- return u.authenticate('password');
- })<%= to() %>.eventually.be.true;
- });
- });
-
-});
diff --git a/app/templates/server/app.js b/app/templates/server/app.js
deleted file mode 100644
index d6280f1e7..000000000
--- a/app/templates/server/app.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Main application file
- */
-
-'use strict';
-
-import express from 'express';<% if (filters.mongoose) { %>
-import mongoose from 'mongoose';<% } %><% if (filters.sequelize) { %>
-import sqldb from './sqldb';<% } %>
-import config from './config/environment';
-import http from 'http';
-<% if (filters.mongoose) { %>
-// Connect to MongoDB
-mongoose.connect(config.mongo.uri, config.mongo.options);
-mongoose.connection.on('error', function(err) {
- console.error('MongoDB connection error: ' + err);
- process.exit(-1);
-});
-<% } %><% if (filters.models) { %>
-// Populate databases with sample data
-if (config.seedDB) { require('./config/seed'); }
-<% } %>
-// Setup server
-var app = express();
-var server = http.createServer(app);<% if (filters.socketio) { %>
-var socketio = require('socket.io')(server, {
- serveClient: config.env !== 'production',
- path: '/socket.io-client'
-});
-require('./config/socketio')(socketio);<% } %>
-require('./config/express')(app);
-require('./routes')(app);
-
-// Start server
-function startServer() {
- server.listen(config.port, config.ip, function() {
- console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
- });
-}
-<% if (filters.sequelize) { %>
-sqldb.sequelize.sync()
- .then(startServer)
- .catch(function(err) {
- console.log('Server failed to start due to error: %s', err);
- });
-<% } else { %>
-setImmediate(startServer);
-<% } %>
-// Expose app
-exports = module.exports = app;
diff --git a/app/templates/server/auth(auth)/auth.service.js b/app/templates/server/auth(auth)/auth.service.js
deleted file mode 100644
index edd16506a..000000000
--- a/app/templates/server/auth(auth)/auth.service.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-import passport from 'passport';
-import config from '../config/environment';
-import jwt from 'jsonwebtoken';
-import expressJwt from 'express-jwt';
-import compose from 'composable-middleware';<% if (filters.mongooseModels) { %>
-import User from '../api/user/user.model';<% } %><% if (filters.sequelizeModels) { %>
-import {User} from'../sqldb';<% } %>
-var validateJwt = expressJwt({
- secret: config.secrets.session
-});
-
-/**
- * Attaches the user object to the request if authenticated
- * Otherwise returns 403
- */
-function isAuthenticated() {
- return compose()
- // Validate jwt
- .use(function(req, res, next) {
- // allow access_token to be passed through query parameter as well
- if (req.query && req.query.hasOwnProperty('access_token')) {
- req.headers.authorization = 'Bearer ' + req.query.access_token;
- }
- validateJwt(req, res, next);
- })
- // Attach user to request
- .use(function(req, res, next) {
- <% if (filters.mongooseModels) { %>User.findByIdAsync(req.user._id)<% }
- if (filters.sequelizeModels) { %>User.find({
- where: {
- _id: req.user._id
- }
- })<% } %>
- .then(function(user) {
- if (!user) {
- return res.status(401).end();
- }
- req.user = user;
- next();
- })
- .catch(function(err) {
- return next(err);
- });
- });
-}
-
-/**
- * Checks if the user role meets the minimum requirements of the route
- */
-function hasRole(roleRequired) {
- if (!roleRequired) {
- throw new Error('Required role needs to be set');
- }
-
- return compose()
- .use(isAuthenticated())
- .use(function meetsRequirements(req, res, next) {
- if (config.userRoles.indexOf(req.user.role) >=
- config.userRoles.indexOf(roleRequired)) {
- next();
- }
- else {
- res.status(403).send('Forbidden');
- }
- });
-}
-
-/**
- * Returns a jwt token signed by the app secret
- */
-function signToken(id, role) {
- return jwt.sign({ _id: id, role: role }, config.secrets.session, {
- expiresInMinutes: 60 * 5
- });
-}
-
-/**
- * Set token cookie directly for oAuth strategies
- */
-function setTokenCookie(req, res) {
- if (!req.user) {
- return res.status(404).send('Something went wrong, please try again.');
- }
- var token = signToken(req.user._id, req.user.role);
- res.cookie('token', token);
- res.redirect('/');
-}
-
-exports.isAuthenticated = isAuthenticated;
-exports.hasRole = hasRole;
-exports.signToken = signToken;
-exports.setTokenCookie = setTokenCookie;
diff --git a/app/templates/server/auth(auth)/facebook(facebookAuth)/index.js b/app/templates/server/auth(auth)/facebook(facebookAuth)/index.js
deleted file mode 100644
index 3605cba5b..000000000
--- a/app/templates/server/auth(auth)/facebook(facebookAuth)/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-import express from 'express';
-import passport from 'passport';
-import auth from '../auth.service';
-
-var router = express.Router();
-
-router
- .get('/', passport.authenticate('facebook', {
- scope: ['email', 'user_about_me'],
- failureRedirect: '/signup',
- session: false
- }))
-
- .get('/callback', passport.authenticate('facebook', {
- failureRedirect: '/signup',
- session: false
- }), auth.setTokenCookie);
-
-module.exports = router;
diff --git a/app/templates/server/auth(auth)/facebook(facebookAuth)/passport.js b/app/templates/server/auth(auth)/facebook(facebookAuth)/passport.js
deleted file mode 100644
index 341e46535..000000000
--- a/app/templates/server/auth(auth)/facebook(facebookAuth)/passport.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import passport from 'passport';
-import {Strategy as FacebookStrategy} from 'passport-facebook';
-
-exports.setup = function(User, config) {
- passport.use(new FacebookStrategy({
- clientID: config.facebook.clientID,
- clientSecret: config.facebook.clientSecret,
- callbackURL: config.facebook.callbackURL,
- profileFields: [
- 'displayName',
- 'emails'
- ]
- },
- function(accessToken, refreshToken, profile, done) {
- <% if (filters.mongooseModels) { %>User.findOneAsync({<% }
- if (filters.sequelizeModels) { %>User.find({<% } %>
- 'facebook.id': profile.id
- })
- .then(function(user) {
- if (!user) {
- <% if (filters.mongooseModels) { %>user = new User({<% }
- if (filters.sequelizeModels) { %>user = User.build({<% } %>
- name: profile.displayName,
- email: profile.emails[0].value,
- role: 'user',
- provider: 'facebook',
- facebook: profile._json
- });
- <% if (filters.mongooseModels) { %>user.saveAsync()<% }
- if (filters.sequelizeModels) { %>user.save()<% } %>
- .then(function(user) {
- return done(null, user);
- })
- .catch(function(err) {
- return done(err);
- });
- } else {
- return done(null, user);
- }
- })
- .catch(function(err) {
- return done(err);
- });
- }));
-};
diff --git a/app/templates/server/auth(auth)/google(googleAuth)/index.js b/app/templates/server/auth(auth)/google(googleAuth)/index.js
deleted file mode 100644
index 906493e7d..000000000
--- a/app/templates/server/auth(auth)/google(googleAuth)/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-import express from 'express';
-import passport from 'passport';
-import auth from '../auth.service';
-
-var router = express.Router();
-
-router
- .get('/', passport.authenticate('google', {
- failureRedirect: '/signup',
- scope: [
- 'profile',
- 'email'
- ],
- session: false
- }))
-
- .get('/callback', passport.authenticate('google', {
- failureRedirect: '/signup',
- session: false
- }), auth.setTokenCookie);
-
-module.exports = router;
diff --git a/app/templates/server/auth(auth)/google(googleAuth)/passport.js b/app/templates/server/auth(auth)/google(googleAuth)/passport.js
deleted file mode 100644
index 97abc3fdf..000000000
--- a/app/templates/server/auth(auth)/google(googleAuth)/passport.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import passport from 'passport';
-import {OAuth2Strategy as GoogleStrategy} from 'passport-google-oauth';
-
-exports.setup = function(User, config) {
- passport.use(new GoogleStrategy({
- clientID: config.google.clientID,
- clientSecret: config.google.clientSecret,
- callbackURL: config.google.callbackURL
- },
- function(accessToken, refreshToken, profile, done) {
- <% if (filters.mongooseModels) { %>User.findOneAsync({<% }
- if (filters.sequelizeModels) { %>User.find({<% } %>
- 'google.id': profile.id
- })
- .then(function(user) {
- if (!user) {
- <% if (filters.mongooseModels) { %>user = new User({<% }
- if (filters.sequelizeModels) { %>user = User.build({<% } %>
- name: profile.displayName,
- email: profile.emails[0].value,
- role: 'user',
- username: profile.emails[0].value.split('@')[0],
- provider: 'google',
- google: profile._json
- });
- <% if (filters.mongooseModels) { %>user.saveAsync()<% }
- if (filters.sequelizeModels) { %>user.save()<% } %>
- .then(function(user) {
- return done(null, user);
- })
- .catch(function(err) {
- return done(err);
- });
- } else {
- return done(null, user);
- }
- })
- .catch(function(err) {
- return done(err);
- });
- }));
-};
diff --git a/app/templates/server/auth(auth)/local/index.js b/app/templates/server/auth(auth)/local/index.js
deleted file mode 100644
index 62ccc4204..000000000
--- a/app/templates/server/auth(auth)/local/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-import express from 'express';
-import passport from 'passport';
-import auth from '../auth.service';
-
-var router = express.Router();
-
-router.post('/', function(req, res, next) {
- passport.authenticate('local', function(err, user, info) {
- var error = err || info;
- if (error) {
- return res.status(401).json(error);
- }
- if (!user) {
- return res.status(404).json({message: 'Something went wrong, please try again.'});
- }
-
- var token = auth.signToken(user._id, user.role);
- res.json({ token: token });
- })(req, res, next)
-});
-
-module.exports = router;
diff --git a/app/templates/server/auth(auth)/local/passport.js b/app/templates/server/auth(auth)/local/passport.js
deleted file mode 100644
index df12bf45a..000000000
--- a/app/templates/server/auth(auth)/local/passport.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import passport from 'passport';
-import {Strategy as LocalStrategy} from 'passport-local';
-
-function localAuthenticate(User, email, password, done) {
- <% if (filters.mongooseModels) { %>User.findOneAsync({
- email: email.toLowerCase()
- })<% }
- if (filters.sequelizeModels) { %>User.find({
- where: {
- email: email.toLowerCase()
- }
- })<% } %>
- .then(function(user) {
- if (!user) {
- return done(null, false, {
- message: 'This email is not registered.'
- });
- }
- user.authenticate(password, function(authError, authenticated) {
- if (authError) {
- return done(authError);
- }
- if (!authenticated) {
- return done(null, false, {
- message: 'This password is not correct.'
- });
- } else {
- return done(null, user);
- }
- });
- })
- .catch(function(err) {
- return done(err);
- });
-}
-
-exports.setup = function(User, config) {
- passport.use(new LocalStrategy({
- usernameField: 'email',
- passwordField: 'password' // this is the virtual field on the model
- }, function(email, password, done) {<% if (filters.models) { %>
- return localAuthenticate(User, email, password, done);
-<% } %> }));
-};
diff --git a/app/templates/server/auth(auth)/twitter(twitterAuth)/index.js b/app/templates/server/auth(auth)/twitter(twitterAuth)/index.js
deleted file mode 100644
index 1810eadc1..000000000
--- a/app/templates/server/auth(auth)/twitter(twitterAuth)/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-import express from 'express';
-import passport from 'passport';
-import auth from '../auth.service';
-
-var router = express.Router();
-
-router
- .get('/', passport.authenticate('twitter', {
- failureRedirect: '/signup',
- session: false
- }))
-
- .get('/callback', passport.authenticate('twitter', {
- failureRedirect: '/signup',
- session: false
- }), auth.setTokenCookie);
-
-module.exports = router;
diff --git a/app/templates/server/auth(auth)/twitter(twitterAuth)/passport.js b/app/templates/server/auth(auth)/twitter(twitterAuth)/passport.js
deleted file mode 100644
index 8c7f341be..000000000
--- a/app/templates/server/auth(auth)/twitter(twitterAuth)/passport.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import passport from 'passport';
-import {Strategy as TwitterStrategy} from 'passport-twitter';
-
-exports.setup = function(User, config) {
- passport.use(new TwitterStrategy({
- consumerKey: config.twitter.clientID,
- consumerSecret: config.twitter.clientSecret,
- callbackURL: config.twitter.callbackURL
- },
- function(token, tokenSecret, profile, done) {
- <% if (filters.mongooseModels) { %>User.findOneAsync({<% }
- if (filters.sequelizeModels) { %>User.find({<% } %>
- 'twitter.id_str': profile.id
- })
- .then(function(user) {
- if (!user) {
- <% if (filters.mongooseModels) { %>user = new User({<% }
- if (filters.sequelizeModels) { %>user = User.build({<% } %>
- name: profile.displayName,
- username: profile.username,
- role: 'user',
- provider: 'twitter',
- twitter: profile._json
- });
- <% if (filters.mongooseModels) { %>user.saveAsync()<% }
- if (filters.sequelizeModels) { %>user.save()<% } %>
- .then(function(user) {
- return done(null, user);
- })
- .catch(function(err) {
- return done(err);
- });
- } else {
- return done(null, user);
- }
- })
- .catch(function(err) {
- return done(err);
- });
- }));
-};
diff --git a/app/templates/server/components/errors/index.js b/app/templates/server/components/errors/index.js
deleted file mode 100644
index ba71c73ba..000000000
--- a/app/templates/server/components/errors/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Error responses
- */
-
-'use strict';
-
-module.exports[404] = function pageNotFound(req, res) {
- var viewFilePath = '404';
- var statusCode = 404;
- var result = {
- status: statusCode
- };
-
- res.status(result.status);
- res.render(viewFilePath, {}, function(err, html) {
- if (err) {
- return res.json(result, result.status);
- }
-
- res.send(html);
- });
-};
diff --git a/app/templates/server/config/_local.env.js b/app/templates/server/config/_local.env.js
deleted file mode 100644
index 82195c471..000000000
--- a/app/templates/server/config/_local.env.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-// Use local.env.js for environment variables that grunt will set when the server starts locally.
-// Use for your api keys, secrets, etc. This file should not be tracked by git.
-//
-// You will need to set these on the server you deploy to.
-
-module.exports = {
- DOMAIN: 'http://localhost:9000/',
- SESSION_SECRET: '<%= lodash.slugify(appname) + "-secret" %>',<% if (filters.facebookAuth) { %>
-
- FACEBOOK_ID: 'app-id',
- FACEBOOK_SECRET: 'secret',<% } if (filters.twitterAuth) { %>
-
- TWITTER_ID: 'app-id',
- TWITTER_SECRET: 'secret',<% } if (filters.googleAuth) { %>
-
- GOOGLE_ID: 'app-id',
- GOOGLE_SECRET: 'secret',
-<% } %>
- // Control debug level for modules using visionmedia/debug
- DEBUG: ''
-};
diff --git a/app/templates/server/config/_local.env.sample.js b/app/templates/server/config/_local.env.sample.js
deleted file mode 100644
index 8106cf731..000000000
--- a/app/templates/server/config/_local.env.sample.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-// Use local.env.js for environment variables that grunt will set when the server starts locally.
-// Use for your api keys, secrets, etc. This file should not be tracked by git.
-//
-// You will need to set these on the server you deploy to.
-
-module.exports = {
- DOMAIN: 'http://localhost:9000/',
- SESSION_SECRET: '<%= lodash.slugify(appname) + "-secret" %>',<% if (filters.facebookAuth) { %>
-
- FACEBOOK_ID: 'app-id',
- FACEBOOK_SECRET: 'secret',<% } if (filters.twitterAuth) { %>
-
- TWITTER_ID: 'app-id',
- TWITTER_SECRET: 'secret',<% } if (filters.googleAuth) { %>
-
- GOOGLE_ID: 'app-id',
- GOOGLE_SECRET: 'secret',<% } %>
-
- // Control debug level for modules using visionmedia/debug
- DEBUG: ''
-};
diff --git a/app/templates/server/config/environment/development.js b/app/templates/server/config/environment/development.js
deleted file mode 100644
index d79b250b3..000000000
--- a/app/templates/server/config/environment/development.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-// Development specific configuration
-// ==================================
-module.exports = {
- // MongoDB connection options
- mongo: {
- uri: 'mongodb://localhost/<%= lodash.slugify(appname) %>-dev'
- },
- sequelize: {
- uri: 'sqlite://',
- options: {
- logging: false,
- storage: 'dev.sqlite',
- define: {
- timestamps: false
- }
- }
- },
-
- seedDB: true
-};
diff --git a/app/templates/server/config/environment/index.js b/app/templates/server/config/environment/index.js
deleted file mode 100644
index 98c892d32..000000000
--- a/app/templates/server/config/environment/index.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-
-var path = require('path');
-var _ = require('lodash');
-
-function requiredProcessEnv(name) {
- if (!process.env[name]) {
- throw new Error('You must set the ' + name + ' environment variable');
- }
- return process.env[name];
-}
-
-// All configurations will extend these options
-// ============================================
-var all = {
- env: process.env.NODE_ENV,
-
- // Root path of server
- root: path.normalize(__dirname + '/../../..'),
-
- // Server port
- port: process.env.PORT || 9000,
-
- // Server IP
- ip: process.env.IP || '0.0.0.0',
-
- // Should we populate the DB with sample data?
- seedDB: false,
-
- // Secret for session, you will want to change this and make it an environment variable
- secrets: {
- session: '<%= lodash.slugify(lodash.humanize(appname)) + '-secret' %>'
- },
-
- // List of user roles
- userRoles: ['guest', 'user', 'admin'],
-
- // MongoDB connection options
- mongo: {
- options: {
- db: {
- safe: true
- }
- }
- }<% if (filters.facebookAuth) { %>,
-
- facebook: {
- clientID: process.env.FACEBOOK_ID || 'id',
- clientSecret: process.env.FACEBOOK_SECRET || 'secret',
- callbackURL: (process.env.DOMAIN || '') + '/auth/facebook/callback'
- }<% } %><% if (filters.twitterAuth) { %>,
-
- twitter: {
- clientID: process.env.TWITTER_ID || 'id',
- clientSecret: process.env.TWITTER_SECRET || 'secret',
- callbackURL: (process.env.DOMAIN || '') + '/auth/twitter/callback'
- }<% } %><% if (filters.googleAuth) { %>,
-
- google: {
- clientID: process.env.GOOGLE_ID || 'id',
- clientSecret: process.env.GOOGLE_SECRET || 'secret',
- callbackURL: (process.env.DOMAIN || '') + '/auth/google/callback'
- }<% } %>
-};
-
-// Export the config object based on the NODE_ENV
-// ==============================================
-module.exports = _.merge(
- all,
- require('./' + process.env.NODE_ENV + '.js') || {});
diff --git a/app/templates/server/config/environment/production.js b/app/templates/server/config/environment/production.js
deleted file mode 100644
index abdda30a3..000000000
--- a/app/templates/server/config/environment/production.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-// Production specific configuration
-// =================================
-module.exports = {
- // Server IP
- ip: process.env.OPENSHIFT_NODEJS_IP ||
- process.env.IP ||
- undefined,
-
- // Server port
- port: process.env.OPENSHIFT_NODEJS_PORT ||
- process.env.PORT ||
- 8080,
-
- // MongoDB connection options
- mongo: {
- uri: process.env.MONGOLAB_URI ||
- process.env.MONGOHQ_URL ||
- process.env.OPENSHIFT_MONGODB_DB_URL +
- process.env.OPENSHIFT_APP_NAME ||
- 'mongodb://localhost/<%= lodash.slugify(appname) %>'
- }
-};
diff --git a/app/templates/server/config/environment/test.js b/app/templates/server/config/environment/test.js
deleted file mode 100644
index ea7d65096..000000000
--- a/app/templates/server/config/environment/test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-// Test specific configuration
-// ===========================
-module.exports = {
- // MongoDB connection options
- mongo: {
- uri: 'mongodb://localhost/<%= lodash.slugify(appname) %>-test'
- },
- sequelize: {
- uri: 'sqlite://',
- options: {
- logging: false,
- storage: 'test.sqlite',
- define: {
- timestamps: false
- }
- }
- }
-};
diff --git a/app/templates/server/config/express.js b/app/templates/server/config/express.js
deleted file mode 100644
index 5c613de9b..000000000
--- a/app/templates/server/config/express.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Express configuration
- */
-
-'use strict';
-
-import express from 'express';
-import favicon from 'serve-favicon';
-import morgan from 'morgan';
-import compression from 'compression';
-import bodyParser from 'body-parser';
-import methodOverride from 'method-override';
-import cookieParser from 'cookie-parser';
-import errorHandler from 'errorhandler';
-import path from 'path';
-import lusca from 'lusca';
-import config from './environment';<% if (filters.auth) { %>
-import passport from 'passport';<% } %>
-import session from 'express-session';<% if (filters.mongoose) { %>
-import connectMongo from 'connect-mongo';
-import mongoose from 'mongoose';
-var mongoStore = connectMongo(session);<% } else if(filters.sequelize) { %>
-import sqldb from '../sqldb';
-import expressSequelizeSession from 'express-sequelize-session';
-var Store = expressSequelizeSession(session.Store);<% } %>
-
-module.exports = function(app) {
- var env = app.get('env');
-
- app.set('views', config.root + '/server/views');<% if (filters.html) { %>
- app.engine('html', require('ejs').renderFile);
- app.set('view engine', 'html');<% } %><% if (filters.jade) { %>
- app.set('view engine', 'jade');<% } %>
- app.use(compression());
- app.use(bodyParser.urlencoded({ extended: false }));
- app.use(bodyParser.json());
- app.use(methodOverride());
- app.use(cookieParser());<% if (filters.auth) { %>
- app.use(passport.initialize());<% } %>
-
- // Persist sessions with mongoStore / sequelizeStore
- // We need to enable sessions for passport-twitter because it's an
- // oauth 1.0 strategy, and Lusca depends on sessions
- app.use(session({
- secret: config.secrets.session,
- saveUninitialized: true,
- resave: false<% if (filters.mongoose) { %>,
- store: new mongoStore({
- mongooseConnection: mongoose.connection,
- db: '<%= lodash.slugify(lodash.humanize(appname)) %>'
- })<% } else if(filters.sequelize) { %>,
- store: new Store(sqldb.sequelize)<% } %>
- }));
-
- /**
- * Lusca - express server security
- * https://github.com/krakenjs/lusca
- */
- if ('test' !== env) {
- app.use(lusca({
- csrf: {
- angular: true
- },
- xframe: 'SAMEORIGIN',
- hsts: {
- maxAge: 31536000, //1 year, in seconds
- includeSubDomains: true,
- preload: true
- },
- xssProtection: true
- }));
- }
-
- app.set('appPath', path.join(config.root, 'client'));
-
- if ('production' === env) {
- app.use(favicon(path.join(config.root, 'client', 'favicon.ico')));
- app.use(express.static(app.get('appPath')));
- app.use(morgan('dev'));
- }
-
- if ('development' === env) {
- app.use(require('connect-livereload')());
- }
-
- if ('development' === env || 'test' === env) {
- app.use(express.static(path.join(config.root, '.tmp')));
- app.use(express.static(app.get('appPath')));
- app.use(morgan('dev'));
- app.use(errorHandler()); // Error handler - has to be last
- }
-};
diff --git a/app/templates/server/config/seed(models).js b/app/templates/server/config/seed(models).js
deleted file mode 100644
index 81f3c6b5c..000000000
--- a/app/templates/server/config/seed(models).js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Populate DB with sample data on server start
- * to disable, edit config/environment/index.js, and set `seedDB: false`
- */
-
-'use strict';<% if (filters.mongooseModels) { %>
-import Thing from '../api/thing/thing.model';<% if (filters.auth) { %>
-import User from '../api/user/user.model';<% } %><% } %><% if (filters.sequelizeModels) { %>
-import sqldb from '../sqldb';
-var Thing = sqldb.Thing;<% if (filters.auth) { %>
-var User = sqldb.User;<% } %><% } %>
-
-<% if (filters.mongooseModels) { %>Thing.find({}).removeAsync()<% }
- if (filters.sequelizeModels) { %>Thing.sync()
- .then(function() {
- return Thing.destroy({ where: {} });
- })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>Thing.create({<% }
- if (filters.sequelizeModels) { %>Thing.bulkCreate([{<% } %>
- name: 'Development Tools',
- info: 'Integration with popular tools such as Bower, Grunt, Babel, Karma, ' +
- 'Mocha, JSHint, Node Inspector, Livereload, Protractor, Jade, ' +
- 'Stylus, Sass, and Less.'
- }, {
- name: 'Server and Client integration',
- info: 'Built with a powerful and fun stack: MongoDB, Express, ' +
- 'AngularJS, and Node.'
- }, {
- name: 'Smart Build System',
- info: 'Build system ignores `spec` files, allowing you to keep ' +
- 'tests alongside code. Automatic injection of scripts and ' +
- 'styles into your index.html'
- }, {
- name: 'Modular Structure',
- info: 'Best practice client and server structures allow for more ' +
- 'code reusability and maximum scalability'
- }, {
- name: 'Optimized Build',
- info: 'Build process packs up your templates as a single JavaScript ' +
- 'payload, minifies your scripts/css/images, and rewrites asset ' +
- 'names for caching.'
- }, {
- name: 'Deployment Ready',
- info: 'Easily deploy your app to Heroku or Openshift with the heroku ' +
- 'and openshift subgenerators'
- <% if (filters.mongooseModels) { %>});<% }
- if (filters.sequelizeModels) { %>}]);<% } %>
- });
-<% if (filters.auth) { %>
-<% if (filters.mongooseModels) { %>User.find({}).removeAsync()<% }
- if (filters.sequelizeModels) { %>User.sync()
- .then(function() {
- return User.destroy({ where: {} });
- })<% } %>
- .then(function() {
- <% if (filters.mongooseModels) { %>User.createAsync({<% }
- if (filters.sequelizeModels) { %>User.bulkCreate([{<% } %>
- provider: 'local',
- name: 'Test User',
- email: 'test@example.com',
- password: 'test'
- }, {
- provider: 'local',
- role: 'admin',
- name: 'Admin',
- email: 'admin@example.com',
- password: 'admin'
- <% if (filters.mongooseModels) { %>})<% }
- if (filters.sequelizeModels) { %>}])<% } %>
- .then(function() {
- console.log('finished populating users');
- });
- });<% } %>
diff --git a/app/templates/server/config/socketio(socketio).js b/app/templates/server/config/socketio(socketio).js
deleted file mode 100644
index 4b2058550..000000000
--- a/app/templates/server/config/socketio(socketio).js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Socket.io configuration
- */
-
-'use strict';
-
-import config from './environment';
-
-// When the user disconnects.. perform this
-function onDisconnect(socket) {
-}
-
-// When the user connects.. perform this
-function onConnect(socket) {
- // When the client emits 'info', this listens and executes
- socket.on('info', function(data) {
- socket.log(JSON.stringify(data, null, 2));
- });
-
- // Insert sockets below
-
-}
-
-module.exports = function(socketio) {
- // socket.io (v1.x.x) is powered by debug.
- // In order to see all the debug output, set DEBUG (in server/config/local.env.js) to including the desired scope.
- //
- // ex: DEBUG: "http*,socket.io:socket"
-
- // We can authenticate socket.io users and access their token through socket.decoded_token
- //
- // 1. You will need to send the token in `client/components/socket/socket.service.js`
- //
- // 2. Require authentication here:
- // socketio.use(require('socketio-jwt').authorize({
- // secret: config.secrets.session,
- // handshake: true
- // }));
-
- socketio.on('connection', function(socket) {
- socket.address = socket.request.connection.remoteAddress +
- ':' + socket.request.connection.remotePort;
-
- socket.connectedAt = new Date();
-
- socket.log = function(...data) {
- console.log(`SocketIO ${socket.nsp.name} [${socket.address}]`, ...data);
- };
-
- // Call onDisconnect.
- socket.on('disconnect', function() {
- onDisconnect(socket);
- socket.log('DISCONNECTED');
- });
-
- // Call onConnect.
- onConnect(socket);
- socket.log('CONNECTED');
- });
-};
diff --git a/app/templates/server/routes.js b/app/templates/server/routes.js
deleted file mode 100644
index 977829165..000000000
--- a/app/templates/server/routes.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Main application routes
- */
-
-'use strict';
-
-import errors from './components/errors';
-import path from 'path';
-
-module.exports = function(app) {
-
- // Insert routes below<% if (filters.auth) { %>
- app.use('/api/users', require('./api/user'));
-
- app.use('/auth', require('./auth'));
-<% } %>
- // All undefined asset or api routes should return a 404
- app.route('/:url(http://github.com/api|auth|components|app|bower_components|assets)/*')
- .get(errors[404]);
-
- // All other routes should redirect to the index.html
- app.route('/*')
- .get(function(req, res) {
- res.sendFile(path.resolve(app.get('appPath') + '/index.html'));
- });
-};
diff --git a/app/templates/server/views/404(jade).jade b/app/templates/server/views/404(jade).jade
deleted file mode 100644
index b5735b4f6..000000000
--- a/app/templates/server/views/404(jade).jade
+++ /dev/null
@@ -1,133 +0,0 @@
-doctype html
-html(lang='en')
-head
- meta(charset='utf-8')
- title Page Not Found :(
- style.
- ::-moz-selection {
- background: #b3d4fc;
- text-shadow: none;
- }
- ::selection {
- background: #b3d4fc;
- text-shadow: none;
- }
- html {
- padding: 30px 10px;
- font-size: 20px;
- line-height: 1.4;
- color: #737373;
- background: #f0f0f0;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
- }
- html,
- input {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- }
- body {
- max-width: 500px;
- _width: 500px;
- padding: 30px 20px 50px;
- border: 1px solid #b3b3b3;
- border-radius: 4px;
- margin: 0 auto;
- box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
- background: #fcfcfc;
- }
- h1 {
- margin: 0 10px;
- font-size: 50px;
- text-align: center;
- }
- h1 span {
- color: #bbb;
- }
- h3 {
- margin: 1.5em 0 0.5em;
- }
- p {
- margin: 1em 0;
- }
- ul {
- padding: 0 0 0 40px;
- margin: 1em 0;
- }
- .container {
- max-width: 380px;
- _width: 380px;
- margin: 0 auto;
- }
- /* google search */
- #goog-fixurl ul {
- list-style: none;
- padding: 0;
- margin: 0;
- }
- #goog-fixurl form {
- margin: 0;
- }
- #goog-wm-qt,
- #goog-wm-sb {
- border: 1px solid #bbb;
- font-size: 16px;
- line-height: normal;
- vertical-align: top;
- color: #444;
- border-radius: 2px;
- }
- #goog-wm-qt {
- width: 220px;
- height: 20px;
- padding: 5px;
- margin: 5px 10px 0 0;
- box-shadow: inset 0 1px 1px #ccc;
- }
- #goog-wm-sb {
- display: inline-block;
- height: 32px;
- padding: 0 10px;
- margin: 5px 0 0;
- white-space: nowrap;
- cursor: pointer;
- background-color: #f5f5f5;
- background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- *overflow: visible;
- *display: inline;
- *zoom: 1;
- }
- #goog-wm-sb:hover,
- #goog-wm-sb:focus {
- border-color: #aaa;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- background-color: #f8f8f8;
- }
- #goog-wm-qt:hover,
- #goog-wm-qt:focus {
- border-color: #105cb6;
- outline: 0;
- color: #222;
- }
- input::-moz-focus-inner {
- padding: 0;
- border: 0;
- }
- body
- .container
- h1
- | Not found
- span :(
- p Sorry, but the page you were trying to view does not exist.
- p It looks like this was the result of either:
- ul
- li a mistyped address
- li an out-of-date link
- script.
- var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
- script(src='http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js')
diff --git a/circle.yml b/circle.yml
new file mode 100644
index 000000000..5feecc9a2
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,56 @@
+version: 2
+jobs:
+ build:
+ docker:
+ - image: circleci/node:12-browsers
+ - image: mongo
+ command: mongod
+
+ working_directory: ~/generator-angular-fullstack
+
+ environment:
+ NODE_ENV: test
+
+ branches:
+ ignore:
+ - gh-pages
+
+ steps:
+ - checkout
+ - run: git submodule sync && git submodule update --init
+
+ # Generator npm dependencies
+ - restore_cache:
+ keys:
+ - generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
+ - generator-angular-fullstack-npm-{{ .Branch }}
+ - generator-angular-fullstack-npm-
+ - run: npm install --quiet
+ - save_cache:
+ key: generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
+ paths:
+ - ~/generator-angular-fullstack/node_modules
+
+ # Test fixtures
+ - run: npx gulp updateFixtures:test
+ - restore_cache:
+ keys:
+ - generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
+ - generator-angular-fullstack-npm-fixtures-{{ .Branch }}
+ - generator-angular-fullstack-npm-fixtures-
+ - run: npx gulp installFixtures
+ - save_cache:
+ key: generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
+ paths:
+ - ~/generator-angular-fullstack/test/fixtures/node_modules
+
+ - run: npx gulp build
+ - run: npm test
+
+# - deploy:
+# command: |
+# if [ "${CIRCLE_BRANCH}" == "master" ]; then
+# git config --global user.email "circleci@circleci.com"
+# git config --global user.name "CircleCI"
+# cd docs && npm install && npm run build && npm run deploy
+# fi
diff --git a/contributing.md b/contributing.md
index 037a6b78f..78170f758 100644
--- a/contributing.md
+++ b/contributing.md
@@ -1,20 +1,32 @@
# Contributing
-See the [contributing docs](https://github.com/yeoman/yeoman/blob/master/contributing.md)
+See the [Yeoman contributing docs](https://github.com/yeoman/yeoman/blob/master/contributing.md)
Additionally for this generator:
-* Please submit PRs to the `canary` branch, it is the main development branch for this generator.
+* Please submit bug fix PRs to the `master` branch. Please submit large feature PRs to the `canary` branch; it is the main development branch for this generator.
* When submitting an issue, please follow the [guidelines](https://github.com/yeoman/yeoman/blob/master/contributing.md#issue-submission). Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.
* When submitting a PR, make sure that the commit messages match the [AngularJS conventions][commit-message-format] (see below).
* When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.
* When submitting a new feature, add tests that cover the feature.
+* Open Issues marked with the [EASY](https://github.com/angular-fullstack/generator-angular-fullstack/issues?q=is%3Aopen+is%3Aissue+label%3AEasy) label are believed to be easy changes, and would be good Issues to tackle for new contributors.
+
+This project has 2 main branches: `master` and `canary`. The `master` branch is where the current stable code lives and should be used for production setups. The `canary` branch is the main development branch, this is where PRs should be submitted to (backport fixes may be applied to `master`).
+
+By separating the current stable code from the cutting-edge development we hope to provide a stable and efficient workflow for users and developers alike.
+
+When submitting a PR, make sure that the commit messages match the [AngularJS conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/).
+
+When submitting a bugfix, try to write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.
+
+When submitting a new feature, add tests that cover the feature.
To run the generator:
+
1. Clone it and `cd` to its root
2. `npm install`
-3. `npm link` (tells NPM to look to your own version)
-4. `yo angular-fullstack` as normal. It should run from your cloned version rather than the one downloaded from NPM.
+3. `npm link` (tells npm to look to your own version)
+4. `yo angular-fullstack` as normal. It should run from your cloned version rather than the one downloaded from npm.
## Git Commit Guidelines
@@ -74,15 +86,9 @@ A detailed explanation can be found in this [document][commit-message-format].
# Releasing
*(for contributors with push access)*
-The `grunt release` task will do most of the work for you, see [`grunt-release`](https://github.com/geddski/grunt-release) for semver usage.
-
-* Manually bump `package.json` version.
-
-*note: this step will be removed once `3.0.0` is released*
-
-* Run the release task `grunt release`.
+The `grunt release` task will do most of the work for you, see [`grunt-release`](https://github.com/geddski/grunt-release#using-grunt-release) for valid release targets.
-*note: once `3.0.0` is released you will need to use a valid `grunt-release` target, see [here](https://github.com/geddski/grunt-release#using-grunt-release)*
+* Run the release task `grunt release:RELEASE_TARGET`.
* Push and publish the `angular-fullstack-deps` submodule.
```bash
diff --git a/contributing/releasing-a-new-version.md b/contributing/releasing-a-new-version.md
new file mode 100644
index 000000000..1c63f3966
--- /dev/null
+++ b/contributing/releasing-a-new-version.md
@@ -0,0 +1,26 @@
+# Releasing a New Version
+
+## Contributing
+
+## Releasing a new version
+
+* Bump `package.json` version
+* \[
+ * `grunt conventionalChangelog`
+ * `cd angular-fullstack-deps`
+ * `git checkout master`
+ * `git pull`
+ * `cd ..`
+ * `gulp updateFixtures:deps`
+ * `cd angular-fullstack-deps`
+ * `git add .`
+ * `git commit -m $VERSION`
+ * `git push`
+ * `# npm publish`
+
+ \]
+* `git add ./{CHANGELOG.md,angular-fullstack-deps,package.json}`
+* `git commit -m $VERSION`
+* `git push`
+* `# npm publish`
+
diff --git a/contributing/untitled-1.md b/contributing/untitled-1.md
new file mode 100644
index 000000000..543774ac4
--- /dev/null
+++ b/contributing/untitled-1.md
@@ -0,0 +1,55 @@
+# Commit Style
+
+## Commit Message Format
+
+Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
+
+```text
+():
+
+
+
+