xing-framework 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/default_configuration/base_app/API_DOC/README +23 -0
- data/default_configuration/base_app/API_DOC/admin-menus +167 -0
- data/default_configuration/base_app/API_DOC/admin-pages +173 -0
- data/default_configuration/base_app/API_DOC/content-block +10 -0
- data/default_configuration/base_app/API_DOC/navigation +54 -0
- data/default_configuration/base_app/API_DOC/page +38 -0
- data/default_configuration/base_app/CHANGELOG.md +122 -0
- data/default_configuration/base_app/Capfile +26 -0
- data/default_configuration/base_app/Gemfile +7 -0
- data/default_configuration/base_app/Gemfile.lock +155 -0
- data/default_configuration/base_app/README.md +24 -0
- data/default_configuration/base_app/Rakefile +25 -0
- data/default_configuration/base_app/backend/Gemfile +45 -0
- data/default_configuration/base_app/backend/Gemfile.lock +292 -0
- data/default_configuration/base_app/backend/README +12 -0
- data/default_configuration/base_app/backend/Rakefile +10 -0
- data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
- data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
- data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
- data/default_configuration/base_app/backend/app/models/user.rb +43 -0
- data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
- data/default_configuration/base_app/backend/bin/bundle +3 -0
- data/default_configuration/base_app/backend/bin/rails +4 -0
- data/default_configuration/base_app/backend/bin/rake +4 -0
- data/default_configuration/base_app/backend/config.ru +6 -0
- data/default_configuration/base_app/backend/config/application.rb +71 -0
- data/default_configuration/base_app/backend/config/boot.rb +4 -0
- data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
- data/default_configuration/base_app/backend/config/database.yml.example +22 -0
- data/default_configuration/base_app/backend/config/environment.rb +5 -0
- data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
- data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
- data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
- data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
- data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
- data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
- data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
- data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
- data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
- data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
- data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
- data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
- data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
- data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
- data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
- data/default_configuration/base_app/backend/config/routes.rb +33 -0
- data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
- data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
- data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
- data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
- data/default_configuration/base_app/backend/db/seeds.rb +14 -0
- data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
- data/default_configuration/base_app/backend/public/404.html +26 -0
- data/default_configuration/base_app/backend/public/422.html +26 -0
- data/default_configuration/base_app/backend/public/500.html +26 -0
- data/default_configuration/base_app/backend/public/favicon.ico +0 -0
- data/default_configuration/base_app/backend/public/index.html +0 -0
- data/default_configuration/base_app/backend/public/robots.txt +5 -0
- data/default_configuration/base_app/backend/script/rails +6 -0
- data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
- data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
- data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
- data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
- data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
- data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
- data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
- data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
- data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
- data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
- data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
- data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
- data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
- data/default_configuration/base_app/backend/static-app.ru +3 -0
- data/default_configuration/base_app/codeclimate.yml +7 -0
- data/default_configuration/base_app/config/compass.rb +21 -0
- data/default_configuration/base_app/config/deploy.rb +157 -0
- data/default_configuration/base_app/config/deploy/bundle-config +4 -0
- data/default_configuration/base_app/config/deploy/production.rb +7 -0
- data/default_configuration/base_app/config/deploy/staging.rb +6 -0
- data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
- data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
- data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
- data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
- data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
- data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
- data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
- data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
- data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
- data/default_configuration/base_app/dummy-api/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
- data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
- data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
- data/default_configuration/base_app/dump.rdb +0 -0
- data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
- data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
- data/default_configuration/base_app/frontend/Gemfile +5 -0
- data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
- data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
- data/default_configuration/base_app/frontend/LICENSE +19 -0
- data/default_configuration/base_app/frontend/README.md +5 -0
- data/default_configuration/base_app/frontend/bin/index.html +0 -0
- data/default_configuration/base_app/frontend/build.config.js +110 -0
- data/default_configuration/base_app/frontend/changelog.tpl +23 -0
- data/default_configuration/base_app/frontend/config/compass.rb +33 -0
- data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
- data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
- data/default_configuration/base_app/frontend/create +0 -0
- data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
- data/default_configuration/base_app/frontend/module.prefix +1 -0
- data/default_configuration/base_app/frontend/module.suffix +1 -0
- data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
- data/default_configuration/base_app/frontend/package.json +75 -0
- data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
- data/default_configuration/base_app/frontend/src/README.md +48 -0
- data/default_configuration/base_app/frontend/src/app/README.md +68 -0
- data/default_configuration/base_app/frontend/src/app/app.js +47 -0
- data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
- data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
- data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
- data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
- data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
- data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
- data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
- data/default_configuration/base_app/frontend/src/common/README.md +19 -0
- data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
- data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
- data/default_configuration/base_app/frontend/src/common/config.js +27 -0
- data/default_configuration/base_app/frontend/src/index.html +86 -0
- data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
- data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
- data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
- data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
- data/default_configuration/base_app/frontend/test/app.js +24 -0
- data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
- data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
- data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
- data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
- data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
- data/default_configuration/base_app/frontend/tools.md +223 -0
- data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
- data/default_configuration/base_app/static-app.ru +3 -0
- data/default_configuration/base_app/tmux-windows +68 -0
- data/default_configuration/base_app/tmux-windows.txt +53 -0
- data/lib/xing/cli.rb +8 -3
- data/lib/xing/cli/generators/new_project.rb +48 -13
- metadata +219 -7
@@ -0,0 +1,75 @@
|
|
1
|
+
{
|
2
|
+
"name": "LRD-CMS2",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"repository": "git@git.lrdesign.com:lrd/cms2.git",
|
5
|
+
"author": "Logical Reality Design",
|
6
|
+
"homepage": "http://lrdesign.com",
|
7
|
+
"scripts": {
|
8
|
+
"test": "grunt test"
|
9
|
+
},
|
10
|
+
"devDependencies": {
|
11
|
+
"a1atscript": "0.4.5",
|
12
|
+
"angular": "~1.4.5",
|
13
|
+
"angular-animate": "~1.4.5",
|
14
|
+
"angular-cookies": "~1.4.5",
|
15
|
+
"angular-fontawesome": "~0.3.1",
|
16
|
+
"angular-mocks": "~1.4.5",
|
17
|
+
"angular-ui-router": "0.2.15",
|
18
|
+
"angular-ui-utils": "~0.1.1",
|
19
|
+
"bower": "~1.3.2",
|
20
|
+
"breakpoint-sass": "^2.6.1",
|
21
|
+
"font-awesome": "^4.4.0",
|
22
|
+
"grunt": "^0.4.5",
|
23
|
+
"grunt-bump": "https://registry.npmjs.org/grunt-bump/-/grunt-bump-0.0.13.tgz",
|
24
|
+
"grunt-bushcaster": "https://registry.npmjs.org/grunt-bushcaster/-/grunt-bushcaster-0.0.7.tgz",
|
25
|
+
"grunt-cli": "~0.1.13",
|
26
|
+
"grunt-coffeelint": "0.0.10",
|
27
|
+
"grunt-concat-sourcemap": "https://registry.npmjs.org/grunt-concat-sourcemap/-/grunt-concat-sourcemap-0.4.3.tgz",
|
28
|
+
"grunt-concurrent": "https://registry.npmjs.org/grunt-concurrent/-/grunt-concurrent-1.0.0.tgz",
|
29
|
+
"grunt-contrib-clean": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-0.5.0.tgz",
|
30
|
+
"grunt-contrib-coffee": "~0.10.1",
|
31
|
+
"grunt-contrib-compass": "https://registry.npmjs.org/grunt-contrib-compass/-/grunt-contrib-compass-1.0.1.tgz",
|
32
|
+
"grunt-contrib-compress": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-0.13.0.tgz",
|
33
|
+
"grunt-contrib-concat": "~0.4.0",
|
34
|
+
"grunt-contrib-connect": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-0.8.0.tgz",
|
35
|
+
"grunt-contrib-copy": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz",
|
36
|
+
"grunt-contrib-jshint": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.11.2.tgz",
|
37
|
+
"grunt-contrib-sass": "^0.8.1",
|
38
|
+
"grunt-contrib-uglify": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.4.1.tgz",
|
39
|
+
"grunt-contrib-watch": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-0.6.1.tgz",
|
40
|
+
"grunt-conventional-changelog": "https://registry.npmjs.org/grunt-conventional-changelog/-/grunt-conventional-changelog-1.1.0.tgz",
|
41
|
+
"grunt-html2js": "https://registry.npmjs.org/grunt-html2js/-/grunt-html2js-0.2.8.tgz",
|
42
|
+
"grunt-jsonlint": "https://registry.npmjs.org/grunt-jsonlint/-/grunt-jsonlint-1.0.4.tgz",
|
43
|
+
"grunt-karma": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-0.8.3.tgz",
|
44
|
+
"grunt-ng-annotate": "https://registry.npmjs.org/grunt-ng-annotate/-/grunt-ng-annotate-0.3.2.tgz",
|
45
|
+
"grunt-string-replace": "^1.2.0",
|
46
|
+
"grunt-xing-index": "0.0.2",
|
47
|
+
"hammerjs": "~2.0.4",
|
48
|
+
"jquery": "^2.1.1",
|
49
|
+
"json": "^9.0.1",
|
50
|
+
"jsonlint": "^1.6.2",
|
51
|
+
"karma": "^0.12.37",
|
52
|
+
"karma-chrome-launcher": "~0.1.3",
|
53
|
+
"karma-coffee-preprocessor": "~0.2.1",
|
54
|
+
"karma-firefox-launcher": "~0.1.3",
|
55
|
+
"karma-jasmine": "~0.3.0",
|
56
|
+
"karma-ng-html2js-preprocessor": "^0.1.0",
|
57
|
+
"karma-requirejs": "^0.2.2",
|
58
|
+
"karma-sourcemap-loader": "git://github.com/LRDesign/karma-sourcemap-loader",
|
59
|
+
"lodash": "^2.4.1",
|
60
|
+
"relayer": "0.1.0",
|
61
|
+
"requirejs": "^2.1.15",
|
62
|
+
"responsive-nav": "~1.0.32",
|
63
|
+
"sass-import-once": "~0.1.1",
|
64
|
+
"singularitygs": "> 0",
|
65
|
+
"traceur": "0.0.87",
|
66
|
+
"uri-templates": "~0.1.5",
|
67
|
+
"xing-framework-sass": "0.0.2",
|
68
|
+
"xing-frontend-grunt": "0.0.8",
|
69
|
+
"xing-frontend-token-auth": "0.0.3",
|
70
|
+
"xing-frontend-utils": "0.0.1-beta5",
|
71
|
+
"xing-grunt-revise": "0.0.1",
|
72
|
+
"xing-inflector": "0.0.2",
|
73
|
+
"xing-traceur": "0.0.8"
|
74
|
+
}
|
75
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# The `src` Directory
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
|
5
|
+
The `src/` directory contains all code used in the application along with all
|
6
|
+
tests of such code.
|
7
|
+
|
8
|
+
```
|
9
|
+
src/
|
10
|
+
|- app/
|
11
|
+
| |- about/
|
12
|
+
| |- home/
|
13
|
+
| |- app.js
|
14
|
+
| |- app.spec.js
|
15
|
+
|- assets/
|
16
|
+
|- common/
|
17
|
+
| |- plusOne/
|
18
|
+
|- less/
|
19
|
+
| |- main.less
|
20
|
+
| |- variables.less
|
21
|
+
|- index.html
|
22
|
+
```
|
23
|
+
|
24
|
+
- `src/app/` - application-specific code, i.e. code not likely to be reused in
|
25
|
+
another application. [Read more »](app/README.md)
|
26
|
+
- `src/assets/` - static files like fonts and images.
|
27
|
+
[Read more »](assets/README.md)
|
28
|
+
- `src/common/` - third-party libraries or components likely to be reused in
|
29
|
+
another application. [Read more »](common/README.md)
|
30
|
+
- `src/less/` - LESS CSS files. [Read more »](less/README.md)
|
31
|
+
- `src/index.html` - this is the HTML document of the single-page application.
|
32
|
+
See below.
|
33
|
+
|
34
|
+
See each directory for a detailed explanation.
|
35
|
+
|
36
|
+
## `index.html`
|
37
|
+
|
38
|
+
The `index.html` file is the HTML document of the single-page application (SPA)
|
39
|
+
that should contain all markup that applies to everything in the app, such as
|
40
|
+
the header and footer. It declares with `ngApp` that this is `ngBoilerplate`,
|
41
|
+
specifies the main `AppCtrl` controller, and contains the `ngView` directive
|
42
|
+
into which route templates are placed.
|
43
|
+
|
44
|
+
Unlike any other HTML document (e.g. the templates), `index.html` is compiled as
|
45
|
+
a Grunt template, so variables from `Gruntfile.js` and `package.json` can be
|
46
|
+
referenced from within it. Changing `name` in `package.json` from
|
47
|
+
"ng-boilerplate" will rename the resultant CSS and JavaScript placed in `build/`,
|
48
|
+
so this HTML references them by variable for convenience.
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# The `src/app` Directory
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
|
5
|
+
```
|
6
|
+
src/
|
7
|
+
|- app/
|
8
|
+
| |- auth/
|
9
|
+
| |- pages/
|
10
|
+
| |- homepage/
|
11
|
+
| |- app.js
|
12
|
+
| |- appConfig.js
|
13
|
+
| |- rootController.js
|
14
|
+
```
|
15
|
+
|
16
|
+
The `src/app` directory contains all code specific to this application. Apart
|
17
|
+
from `app.js` , this directory is
|
18
|
+
filled with subdirectories corresponding to high-level sections of the
|
19
|
+
application, often corresponding to top-level routes. Each directory can have as
|
20
|
+
many subdirectories as it needs, and the build system will understand what to
|
21
|
+
do. For example, a top-level route might be "products", which would be a folder
|
22
|
+
within the `src/app` directory that conceptually corresponds to the top-level
|
23
|
+
route `/products`, though this is in no way enforced. Products may then have
|
24
|
+
subdirectories for "create", "view", "search", etc. The "view" submodule may
|
25
|
+
then define a route of `/products/:id`, ad infinitum.
|
26
|
+
|
27
|
+
## `app.js`
|
28
|
+
|
29
|
+
This is our main app configuration file. It kickstarts the whole process by
|
30
|
+
requiring all the modules from `src/app` that we need. We must load these now to
|
31
|
+
ensure the routes are loaded. If as in our "products" example there are
|
32
|
+
subroutes, we only require the top-level module, and allow the submodules to
|
33
|
+
require their own submodules.
|
34
|
+
|
35
|
+
As a matter of course, we also require the template modules that are generated
|
36
|
+
during the build.
|
37
|
+
|
38
|
+
However, the modules from `src/common` should be required by the app
|
39
|
+
submodules that need them to ensure proper dependency handling. These are
|
40
|
+
app-wide dependencies that are required to assemble your app.
|
41
|
+
|
42
|
+
```js
|
43
|
+
var app = new Module(appName, [
|
44
|
+
'templates-app', 'templates-common', 'ui.router',
|
45
|
+
'picardy.fontawesome',
|
46
|
+
StateAttrs,
|
47
|
+
UIRouteLogger,
|
48
|
+
Menus,
|
49
|
+
Homepage,
|
50
|
+
Auth,
|
51
|
+
Admin,
|
52
|
+
ResponsiveMenu,
|
53
|
+
Metadata,
|
54
|
+
ExampleForm,
|
55
|
+
SessionLinks,
|
56
|
+
Toast,
|
57
|
+
Pages,
|
58
|
+
Backend,
|
59
|
+
NavigationBar,
|
60
|
+
appConfig,
|
61
|
+
RootCtrl
|
62
|
+
]);
|
63
|
+
```
|
64
|
+
|
65
|
+
With app modules broken down in this way, all routing is performed by the
|
66
|
+
submodules we include, as that is where our app's functionality is really
|
67
|
+
defined. So all we need to do in `app.js` is specify a default route to follow,
|
68
|
+
which route of course is defined in a submodule.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import {appName} from 'config';
|
2
|
+
import {} from 'build/templates-app.js';
|
3
|
+
import {} from 'build/templates-common.js';
|
4
|
+
|
5
|
+
import { Module, Injector } from "a1atscript";
|
6
|
+
import SessionLinks from 'components/sessionLinks/sessionLinks.js';
|
7
|
+
|
8
|
+
import {
|
9
|
+
Fallback,
|
10
|
+
Toast,
|
11
|
+
ResponsiveMenu,
|
12
|
+
UnimplementedDirective,
|
13
|
+
StateAttrs,
|
14
|
+
uiRouteLogger,
|
15
|
+
stateFallback,
|
16
|
+
ExampleForm
|
17
|
+
} from 'xing-frontend-utils';
|
18
|
+
|
19
|
+
import appConfig from './appConfig.js';
|
20
|
+
|
21
|
+
import Auth from './auth/auth.js';
|
22
|
+
import Homepage from './homepage/homepage.js';
|
23
|
+
|
24
|
+
import * as RootStates from './rootStates.js';
|
25
|
+
import RootCtrl from './rootController.js';
|
26
|
+
|
27
|
+
var app = new Module(appName, [
|
28
|
+
'templates-app', 'templates-common', 'ui.router',
|
29
|
+
'picardy.fontawesome',
|
30
|
+
StateAttrs,
|
31
|
+
uiRouteLogger,
|
32
|
+
stateFallback,
|
33
|
+
Homepage,
|
34
|
+
Auth,
|
35
|
+
Fallback,
|
36
|
+
ResponsiveMenu,
|
37
|
+
UnimplementedDirective,
|
38
|
+
ExampleForm,
|
39
|
+
SessionLinks,
|
40
|
+
Toast,
|
41
|
+
appConfig,
|
42
|
+
RootStates,
|
43
|
+
RootCtrl
|
44
|
+
]);
|
45
|
+
|
46
|
+
var injector = new Injector(appName);
|
47
|
+
injector.instantiate(app);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import {Config} from 'a1atscript';
|
2
|
+
import {whenGoto} from 'xing-frontend-utils';
|
3
|
+
|
4
|
+
@Config('$stateProvider', '$urlRouterProvider', '$locationProvider')
|
5
|
+
export default function appConfig( $stateProvider, $urlRouterProvider, $locationProvider ) {
|
6
|
+
// enable html5 mode
|
7
|
+
$locationProvider.html5Mode(true);
|
8
|
+
|
9
|
+
// html5 mode when frontend urls hit directly they become a backend request
|
10
|
+
// backend in-turn redirects to /?goto=url wher url is the intended frontend url
|
11
|
+
// this function then redirects frontend (via history API) to appropriate frontend
|
12
|
+
// route
|
13
|
+
$urlRouterProvider.when(/.*/, ['$location', whenGoto]);
|
14
|
+
|
15
|
+
$urlRouterProvider.otherwise(($injector, $location) => {
|
16
|
+
$injector.get('$state').go('root.homepage.show');
|
17
|
+
//return '/home';
|
18
|
+
});
|
19
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import {backendUrl} from 'config';
|
2
|
+
import Sessions from './sessions/sessions.js';
|
3
|
+
import Registrations from './registrations/registrations.js';
|
4
|
+
import Confirmations from './confirmations/confirmations.js';
|
5
|
+
import Passwords from './passwords/passwords.js';
|
6
|
+
import AuthConfig from './config.js';
|
7
|
+
import {Config, Module} from 'a1atscript';
|
8
|
+
|
9
|
+
@Config('$authProvider', 'authConfigProvider')
|
10
|
+
function authSetup($authProvider, authConfigProvider) {
|
11
|
+
|
12
|
+
var location = window.location.href;
|
13
|
+
var confirmationLocation = new URL(location)
|
14
|
+
confirmationLocation.pathname = "/confirmed";
|
15
|
+
confirmationLocation.search = "";
|
16
|
+
|
17
|
+
var passwordResetSuccessLocation = new URL(location)
|
18
|
+
passwordResetSuccessLocation.pathname = "/update-password";
|
19
|
+
passwordResetSuccessLocation.search = "";
|
20
|
+
|
21
|
+
var storageType = 'localStorage';
|
22
|
+
|
23
|
+
try {
|
24
|
+
localStorage.setItem("mod", "mod");
|
25
|
+
localStorage.removeItem("mod");
|
26
|
+
} catch(e) {
|
27
|
+
storageType = 'cookies';
|
28
|
+
}
|
29
|
+
|
30
|
+
$authProvider.configure({
|
31
|
+
apiUrl: backendUrl,
|
32
|
+
tokenValidationPath: 'users/validate_token',
|
33
|
+
signOutUrl: 'users/sign_out',
|
34
|
+
// ng-token-auth expects to setup with email -- we've modified the server
|
35
|
+
// side to work with anything but haven't forked ng-token-auth yet.
|
36
|
+
emailRegistrationPath: 'users',
|
37
|
+
accountUpdatePath: 'users',
|
38
|
+
accountDeletePath: 'users',
|
39
|
+
passwordResetPath: 'users/password',
|
40
|
+
passwordUpdatePath: 'users/password',
|
41
|
+
emailSignInPath: 'users/sign_in',
|
42
|
+
storage: storageType,
|
43
|
+
confirmationSuccessUrl: confirmationLocation.toString(),
|
44
|
+
passwordResetSuccessUrl: passwordResetSuccessLocation.toString()
|
45
|
+
});
|
46
|
+
|
47
|
+
// change this to a different key as the auth key
|
48
|
+
authConfigProvider.authKey("email");
|
49
|
+
|
50
|
+
// turn this off to remove links to reset password
|
51
|
+
authConfigProvider.enableRecovery();
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
// remove modules as neccesary here if you don't want complex authorization
|
56
|
+
var authModule = new Module( 'auth', [
|
57
|
+
'ng-token-auth',
|
58
|
+
Sessions,
|
59
|
+
Registrations,
|
60
|
+
Confirmations,
|
61
|
+
Passwords,
|
62
|
+
AuthConfig,
|
63
|
+
authSetup
|
64
|
+
]);
|
65
|
+
|
66
|
+
export default authModule;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import {Provider, Module} from 'a1atscript';
|
2
|
+
|
3
|
+
@Module('auth.config')
|
4
|
+
@Provider('authConfig')
|
5
|
+
export default function authConfig() {
|
6
|
+
var config = {
|
7
|
+
authKey: "email",
|
8
|
+
recoverable: false
|
9
|
+
};
|
10
|
+
|
11
|
+
this.authKey = function (name) {
|
12
|
+
config.authKey = name;
|
13
|
+
};
|
14
|
+
|
15
|
+
this.enableRecovery = function() {
|
16
|
+
config.recoverable = true;
|
17
|
+
};
|
18
|
+
|
19
|
+
this.$get = [function authKey() {
|
20
|
+
return config;
|
21
|
+
}];
|
22
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<h2>Your email address has been successfully confirmed.</h2>
|
data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import {State} from "stateInjector";
|
2
|
+
import {LoggedInOnlyState} from "stateClasses";
|
3
|
+
|
4
|
+
|
5
|
+
@State('root.inner.confirmationsSuccess')
|
6
|
+
export class ConfirmationsSuccessState extends LoggedInOnlyState {
|
7
|
+
constructor() {
|
8
|
+
super();
|
9
|
+
this.url = '^/confirmed';
|
10
|
+
this.templateUrl = 'auth/confirmations/confirmations-success.tpl.html';
|
11
|
+
}
|
12
|
+
}
|
data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>Forgot your password?</h1>
|
2
|
+
|
3
|
+
<p>Enter your email address below to receive a new confirmation email.</p>
|
4
|
+
|
5
|
+
<form id='passwords-request-form'>
|
6
|
+
<div class='lrd-form-row'>
|
7
|
+
<label for="email">Email:</label>
|
8
|
+
<input name="email" ng-model="passwordRequest.email" placeholder="Email" />
|
9
|
+
<span class='comment'></span>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class='lrd-form-row'>
|
13
|
+
<button type="submit" ng-click="passwordRequestSubmit()" class="call-to-action">Send password reset instructions</button>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
</form>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h1>Reset Your Password</h1>
|
2
|
+
|
3
|
+
<form id='passwords-update-form'>
|
4
|
+
|
5
|
+
<div class='lrd-form-row'>
|
6
|
+
<label for="password">New Password:</label>
|
7
|
+
<input type="password" name="password" ng-model="passwordUpdate.password" placeholder="New Password" />
|
8
|
+
<span class='comment'></span>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class='lrd-form-row'>
|
12
|
+
<label for="password-confirmation">Confirm New Password:</label>
|
13
|
+
<input type="password" name="password-confirmation" ng-model="passwordUpdate.passwordConfirmation" placeholder="New Password" />
|
14
|
+
<span class='comment'></span>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class='lrd-form-row'>
|
18
|
+
<button type="submit" ng-click="passwordUpdateSubmit()" class='call-to-action'>Update Password</button>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
</form>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import {Module} from 'a1atscript';
|
2
|
+
import * as PasswordsStates from './passwordsStates.js';
|
3
|
+
import * as PasswordsControllers from './passwordsControllers.js';
|
4
|
+
|
5
|
+
var passwords = new Module('auth.passwords', [
|
6
|
+
'ui.router.state',
|
7
|
+
'ng-token-auth',
|
8
|
+
PasswordsStates,
|
9
|
+
PasswordsControllers]);
|
10
|
+
|
11
|
+
export default passwords;
|