@tech4good/angular-schematics 13.0.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +1 -1
- package/src/collection.json +9 -4
- package/src/component/files/__name@dasherize__/__name@dasherize__.animations.ts.template +4 -0
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.html.template +3 -0
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.scss.template +7 -0
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +25 -0
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +30 -0
- package/src/component/index.d.ts +1 -1
- package/src/component/index.js +85 -94
- package/src/component/index.js.map +1 -1
- package/src/component/schema.json +27 -13
- package/src/container/files/__name@dasherize__/+state/__name@dasherize__.actions.ts.template +27 -0
- package/src/container/files/__name@dasherize__/+state/__name@dasherize__.effects.ts.template +47 -0
- package/src/container/files/__name@dasherize__/+state/__name@dasherize__.model.ts.template +0 -0
- package/src/container/files/__name@dasherize__/+state/__name@dasherize__.selectors.ts.template +20 -0
- package/src/container/files/__name@dasherize__/+state/__name@dasherize__.state.ts.template +13 -0
- package/src/container/files/__name@dasherize__/__name@dasherize__.animations.ts.template +4 -0
- package/src/container/files/__name@dasherize__/__name@dasherize__.component.html.template +3 -0
- package/src/container/files/__name@dasherize__/__name@dasherize__.component.scss.template +5 -0
- package/src/container/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +25 -0
- package/src/container/files/__name@dasherize__/__name@dasherize__.component.ts.template +81 -0
- package/src/container/index.d.ts +1 -1
- package/src/container/index.js +106 -273
- package/src/container/index.js.map +1 -1
- package/src/container/schema.json +28 -9
- package/src/entity/files/__name@dasherize__/__name@dasherize__.actions.ts.template +270 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.effects.ts.template +131 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.model.ts.template +7 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.spec.ts.template +13 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.ts.template +51 -0
- package/src/entity/files/__name@dasherize__/__name@dasherize__.service.ts.template +50 -0
- package/src/entity/index.d.ts +1 -1
- package/src/entity/index.js +105 -506
- package/src/entity/index.js.map +1 -1
- package/src/entity/schema.json +25 -6
- package/src/init/files/.eslintrc.json +120 -0
- package/src/init/files/.gitattributes +11 -0
- package/src/init/files/.github/workflows/angular-github-ci.yml.template +60 -0
- package/src/init/files/angular.json.template +132 -0
- package/src/init/files/package.json.template +60 -0
- package/src/init/files/src/app/app.component.html +3 -0
- package/src/init/files/src/app/app.component.scss +4 -0
- package/src/init/files/src/app/general/e404/e404.component.html +1 -0
- package/src/init/files/src/app/general/e404/e404.component.scss +0 -0
- package/src/init/files/src/app/general/login/login.component.html +11 -0
- package/src/init/files/src/app/general/login/login.component.scss +29 -0
- package/src/init/files/src/index.html.template +19 -0
- package/src/init/files/src/styles/_variables.scss +0 -0
- package/src/init/files/src/styles.scss +13 -0
- package/src/init/index.d.ts +2 -0
- package/src/init/index.js +50 -0
- package/src/init/index.js.map +1 -0
- package/src/init/schema.json +28 -0
- package/src/module/files/__name@dasherize__/__name@dasherize__-routing.module.ts.template +13 -0
- package/src/module/files/__name@dasherize__/__name@dasherize__.module.spec.ts.template +13 -0
- package/src/module/files/__name@dasherize__/__name@dasherize__.module.ts.template +24 -0
- package/src/module/index.d.ts +1 -1
- package/src/module/index.js +87 -78
- package/src/module/index.js.map +1 -1
- package/src/module/schema.json +21 -6
- package/src/shared/statements-adder.d.ts +3 -0
- package/src/shared/statements-adder.js +22 -1
- package/src/shared/statements-adder.js.map +1 -1
package/src/entity/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;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|
-
"title": "
|
|
3
|
+
"$id": "EntitySchema",
|
|
4
|
+
"title": "Entity Schema",
|
|
5
5
|
"type": "object",
|
|
6
|
+
"description": "Creates a new entity in the default project.",
|
|
6
7
|
"properties": {
|
|
7
8
|
"index": {
|
|
8
9
|
"type": "number",
|
|
9
10
|
"default": 1
|
|
10
11
|
},
|
|
11
|
-
"
|
|
12
|
+
"path": {
|
|
12
13
|
"type": "string",
|
|
13
|
-
"
|
|
14
|
+
"format": "path",
|
|
15
|
+
"description": "The path at which to create the entity file, relative to the current workspace. Should typically be within /src/app/core/store.",
|
|
16
|
+
"visible": false
|
|
14
17
|
},
|
|
15
|
-
"
|
|
18
|
+
"project": {
|
|
16
19
|
"type": "string",
|
|
17
|
-
"
|
|
20
|
+
"description": "The name of the project.",
|
|
21
|
+
"$default": {
|
|
22
|
+
"$source": "projectName"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The name of the entity.",
|
|
28
|
+
"$default": {
|
|
29
|
+
"$source": "argv",
|
|
30
|
+
"index": 0
|
|
31
|
+
},
|
|
32
|
+
"x-prompt": "What name would you like to use for the entity?"
|
|
33
|
+
},
|
|
34
|
+
"inDirectory": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"x-prompt": "Are you currently in the directory where you want to generate the entity? (typically directly in src/app/core/store)"
|
|
18
37
|
}
|
|
19
38
|
},
|
|
20
39
|
"required": [
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"projects/**/*"
|
|
5
|
+
],
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": [
|
|
9
|
+
"*.ts"
|
|
10
|
+
],
|
|
11
|
+
"parserOptions": {
|
|
12
|
+
"project": [
|
|
13
|
+
"tsconfig.json"
|
|
14
|
+
],
|
|
15
|
+
"createDefaultProgram": true
|
|
16
|
+
},
|
|
17
|
+
"extends": [
|
|
18
|
+
"plugin:@angular-eslint/recommended",
|
|
19
|
+
"plugin:@angular-eslint/template/process-inline-templates",
|
|
20
|
+
"eslint:recommended",
|
|
21
|
+
"plugin:@typescript-eslint/recommended",
|
|
22
|
+
"google"
|
|
23
|
+
],
|
|
24
|
+
"rules": {
|
|
25
|
+
"@angular-eslint/component-selector": [
|
|
26
|
+
"error",
|
|
27
|
+
{
|
|
28
|
+
"prefix": "app",
|
|
29
|
+
"style": "kebab-case",
|
|
30
|
+
"type": "element"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"@angular-eslint/directive-selector": [
|
|
34
|
+
"error",
|
|
35
|
+
{
|
|
36
|
+
"prefix": "app",
|
|
37
|
+
"style": "camelCase",
|
|
38
|
+
"type": "attribute"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"@angular-eslint/no-empty-lifecycle-method": "off",
|
|
42
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
43
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
44
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
45
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
46
|
+
"max-len": "off",
|
|
47
|
+
"require-jsdoc": "off",
|
|
48
|
+
"valid-jsdoc": "off",
|
|
49
|
+
"no-unused-vars": "off",
|
|
50
|
+
"new-cap": "off",
|
|
51
|
+
"object-curly-spacing": ["error", "always"],
|
|
52
|
+
"quotes": ["error", "single", {
|
|
53
|
+
"allowTemplateLiterals": true,
|
|
54
|
+
"avoidEscape": true
|
|
55
|
+
}],
|
|
56
|
+
"spaced-comment": ["error", "always", {
|
|
57
|
+
"line": {
|
|
58
|
+
"markers": ["/"],
|
|
59
|
+
"exceptions": ["-", "+"]
|
|
60
|
+
},
|
|
61
|
+
"block": {
|
|
62
|
+
"markers": ["!"],
|
|
63
|
+
"exceptions": ["*"],
|
|
64
|
+
"balanced": true
|
|
65
|
+
}
|
|
66
|
+
}],
|
|
67
|
+
"indent": "off",
|
|
68
|
+
"@typescript-eslint/indent": [
|
|
69
|
+
"error", 2, {
|
|
70
|
+
"CallExpression": {
|
|
71
|
+
"arguments": 1
|
|
72
|
+
},
|
|
73
|
+
"MemberExpression": "off",
|
|
74
|
+
"ObjectExpression": 1,
|
|
75
|
+
"ArrayExpression": 1,
|
|
76
|
+
"SwitchCase": 1,
|
|
77
|
+
"FunctionDeclaration": {
|
|
78
|
+
"body": 1,
|
|
79
|
+
"parameters": 1
|
|
80
|
+
},
|
|
81
|
+
"FunctionExpression": {
|
|
82
|
+
"body": 1,
|
|
83
|
+
"parameters": 1
|
|
84
|
+
},
|
|
85
|
+
"ignoredNodes": [
|
|
86
|
+
"ConditionalExpression",
|
|
87
|
+
"FunctionExpression > .params[decorators.length > 0]",
|
|
88
|
+
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
|
|
89
|
+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"files": [
|
|
97
|
+
"*.actions.ts",
|
|
98
|
+
"*.selectors.ts",
|
|
99
|
+
"*.spec.ts",
|
|
100
|
+
"*.effects.ts",
|
|
101
|
+
"src/app/core/store/**/*.service.ts",
|
|
102
|
+
"src/app/core/firebase/firebase.service.ts",
|
|
103
|
+
"src/app/core/analytics/time-analytics.service.ts",
|
|
104
|
+
"src/app/core/setup/module-import-guard.ts"
|
|
105
|
+
],
|
|
106
|
+
"rules": {
|
|
107
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"files": [
|
|
112
|
+
"*.html"
|
|
113
|
+
],
|
|
114
|
+
"extends": [
|
|
115
|
+
"plugin:@angular-eslint/template/recommended"
|
|
116
|
+
],
|
|
117
|
+
"rules": {}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Make it so that all files have LF line endings on checkout.
|
|
2
|
+
* text eol=lf
|
|
3
|
+
|
|
4
|
+
# Denote all files that are truly binary and should not be modified.
|
|
5
|
+
*.png binary
|
|
6
|
+
*.jpg binary
|
|
7
|
+
*.jpeg binary
|
|
8
|
+
*.svg binary
|
|
9
|
+
*.woff binary
|
|
10
|
+
*.ico binary
|
|
11
|
+
*.pdf binary
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run the linter on the relevant version of node
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Angular Github CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ master ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ master ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
node-version: [16.x]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
|
23
|
+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
|
24
|
+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
|
25
|
+
- name: Check out repository code
|
|
26
|
+
uses: actions/checkout@v2
|
|
27
|
+
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
|
28
|
+
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
29
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
30
|
+
uses: actions/setup-node@v2
|
|
31
|
+
with:
|
|
32
|
+
node-version: ${{ matrix.node-version }}
|
|
33
|
+
cache: 'npm'
|
|
34
|
+
- run: npm ci
|
|
35
|
+
- run: npm run build
|
|
36
|
+
- name: List files in distribution directory
|
|
37
|
+
run: |
|
|
38
|
+
ls -R ./dist
|
|
39
|
+
- run: npm run lint
|
|
40
|
+
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
41
|
+
- name: Send Slack notification on success
|
|
42
|
+
if: ${{ success() }}
|
|
43
|
+
uses: rtCamp/action-slack-notify@v2
|
|
44
|
+
env:
|
|
45
|
+
SLACK_CHANNEL: bots-<%= dasherize(project) %>
|
|
46
|
+
SLACK_USERNAME: Github Actions
|
|
47
|
+
SLACK_COLOR: ${{ job.status }}
|
|
48
|
+
SLACK_MESSAGE: ":white_check_mark: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}"
|
|
49
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
50
|
+
MSG_MINIMAL: commit,actions url
|
|
51
|
+
- name: Send Slack notification on failure
|
|
52
|
+
if: ${{ failure() }}
|
|
53
|
+
uses: rtCamp/action-slack-notify@v2
|
|
54
|
+
env:
|
|
55
|
+
SLACK_CHANNEL: bots-<%= dasherize(project) %>
|
|
56
|
+
SLACK_USERNAME: Github Actions
|
|
57
|
+
SLACK_COLOR: ${{ job.status }}
|
|
58
|
+
SLACK_MESSAGE: ":x: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}"
|
|
59
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
60
|
+
MSG_MINIMAL: commit,actions url
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cli": {
|
|
5
|
+
"cache": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"path": ".cache",
|
|
8
|
+
"environment": "all"
|
|
9
|
+
},
|
|
10
|
+
"defaultCollection": "@tech4good/angular-schematics"
|
|
11
|
+
},
|
|
12
|
+
"newProjectRoot": "projects",
|
|
13
|
+
"projects": {
|
|
14
|
+
"<%= dasherize(project) %>": {
|
|
15
|
+
"projectType": "application",
|
|
16
|
+
"schematics": {
|
|
17
|
+
"@schematics/angular:component": {
|
|
18
|
+
"style": "scss"
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
"root": "",
|
|
22
|
+
"sourceRoot": "src",
|
|
23
|
+
"prefix": "app",
|
|
24
|
+
"architect": {
|
|
25
|
+
"build": {
|
|
26
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
27
|
+
"options": {
|
|
28
|
+
"outputPath": "dist/<%= dasherize(project) %>",
|
|
29
|
+
"index": "src/index.html",
|
|
30
|
+
"main": "src/main.ts",
|
|
31
|
+
"polyfills": "src/polyfills.ts",
|
|
32
|
+
"tsConfig": "tsconfig.app.json",
|
|
33
|
+
"inlineStyleLanguage": "scss",
|
|
34
|
+
"assets": [
|
|
35
|
+
"src/favicon.ico",
|
|
36
|
+
"src/assets"
|
|
37
|
+
],
|
|
38
|
+
"styles": [
|
|
39
|
+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
|
40
|
+
"src/styles.scss"
|
|
41
|
+
],
|
|
42
|
+
"stylePreprocessorOptions": {
|
|
43
|
+
"includePaths": [
|
|
44
|
+
"src/styles"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"scripts": []
|
|
48
|
+
},
|
|
49
|
+
"configurations": {
|
|
50
|
+
"production": {
|
|
51
|
+
"budgets": [
|
|
52
|
+
{
|
|
53
|
+
"type": "initial",
|
|
54
|
+
"maximumWarning": "2mb",
|
|
55
|
+
"maximumError": "5mb"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "anyComponentStyle",
|
|
59
|
+
"maximumWarning": "2kb",
|
|
60
|
+
"maximumError": "4kb"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"fileReplacements": [
|
|
64
|
+
{
|
|
65
|
+
"replace": "src/environments/environment.ts",
|
|
66
|
+
"with": "src/environments/environment.prod.ts"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"outputHashing": "all"
|
|
70
|
+
},
|
|
71
|
+
"development": {
|
|
72
|
+
"buildOptimizer": false,
|
|
73
|
+
"optimization": false,
|
|
74
|
+
"vendorChunk": true,
|
|
75
|
+
"extractLicenses": false,
|
|
76
|
+
"sourceMap": true,
|
|
77
|
+
"namedChunks": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"defaultConfiguration": "production"
|
|
81
|
+
},
|
|
82
|
+
"serve": {
|
|
83
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
84
|
+
"configurations": {
|
|
85
|
+
"production": {
|
|
86
|
+
"browserTarget": "<%= dasherize(project) %>:build:production"
|
|
87
|
+
},
|
|
88
|
+
"development": {
|
|
89
|
+
"browserTarget": "<%= dasherize(project) %>:build:development"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"defaultConfiguration": "development"
|
|
93
|
+
},
|
|
94
|
+
"extract-i18n": {
|
|
95
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
96
|
+
"options": {
|
|
97
|
+
"browserTarget": "<%= dasherize(project) %>:build"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"test": {
|
|
101
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
102
|
+
"options": {
|
|
103
|
+
"main": "src/test.ts",
|
|
104
|
+
"polyfills": "src/polyfills.ts",
|
|
105
|
+
"tsConfig": "tsconfig.spec.json",
|
|
106
|
+
"karmaConfig": "karma.conf.js",
|
|
107
|
+
"inlineStyleLanguage": "scss",
|
|
108
|
+
"assets": [
|
|
109
|
+
"src/favicon.ico",
|
|
110
|
+
"src/assets"
|
|
111
|
+
],
|
|
112
|
+
"styles": [
|
|
113
|
+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
|
114
|
+
"src/styles.scss"
|
|
115
|
+
],
|
|
116
|
+
"scripts": []
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"lint": {
|
|
120
|
+
"builder": "@angular-eslint/builder:lint",
|
|
121
|
+
"options": {
|
|
122
|
+
"lintFilePatterns": [
|
|
123
|
+
"src/**/*.ts",
|
|
124
|
+
"src/**/*.html"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"defaultProject": "<%= dasherize(project) %>"
|
|
132
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= dasherize(project) %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve",
|
|
7
|
+
"build": "ng build",
|
|
8
|
+
"watch": "ng build --watch --configuration development",
|
|
9
|
+
"test": "ng test",
|
|
10
|
+
"lint": "ng lint",
|
|
11
|
+
"lintfix": "ng lint --fix"
|
|
12
|
+
},
|
|
13
|
+
"private": true,
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@angular/animations": "~13.3.0",
|
|
16
|
+
"@angular/cdk": "^13.3.5",
|
|
17
|
+
"@angular/common": "~13.3.0",
|
|
18
|
+
"@angular/compiler": "~13.3.0",
|
|
19
|
+
"@angular/core": "~13.3.0",
|
|
20
|
+
"@angular/fire": "^7.3.0",
|
|
21
|
+
"@angular/forms": "~13.3.0",
|
|
22
|
+
"@angular/material": "^13.3.5",
|
|
23
|
+
"@angular/platform-browser": "~13.3.0",
|
|
24
|
+
"@angular/platform-browser-dynamic": "~13.3.0",
|
|
25
|
+
"@angular/router": "~13.3.0",
|
|
26
|
+
"@ngrx/effects": "^13.1.0",
|
|
27
|
+
"@ngrx/entity": "^13.1.0",
|
|
28
|
+
"@ngrx/router-store": "^13.1.0",
|
|
29
|
+
"@ngrx/store": "^13.1.0",
|
|
30
|
+
"@ngrx/store-devtools": "^13.1.0",
|
|
31
|
+
"@tech4good/angular-schematics": "^13.1.0",
|
|
32
|
+
"rxjs": "~7.5.0",
|
|
33
|
+
"tslib": "^2.3.0",
|
|
34
|
+
"zone.js": "~0.11.4"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@angular-devkit/build-angular": "~13.3.4",
|
|
38
|
+
"@angular-eslint/builder": "13.2.1",
|
|
39
|
+
"@angular-eslint/eslint-plugin": "13.2.1",
|
|
40
|
+
"@angular-eslint/eslint-plugin-template": "13.2.1",
|
|
41
|
+
"@angular-eslint/schematics": "13.2.1",
|
|
42
|
+
"@angular-eslint/template-parser": "13.2.1",
|
|
43
|
+
"@angular/cli": "~13.3.4",
|
|
44
|
+
"@angular/compiler-cli": "~13.3.0",
|
|
45
|
+
"@ngrx/schematics": "^13.1.0",
|
|
46
|
+
"@types/jasmine": "~3.10.0",
|
|
47
|
+
"@types/node": "^12.11.1",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "5.17.0",
|
|
49
|
+
"@typescript-eslint/parser": "5.17.0",
|
|
50
|
+
"eslint": "^8.12.0",
|
|
51
|
+
"eslint-config-google": "^0.14.0",
|
|
52
|
+
"jasmine-core": "~4.0.0",
|
|
53
|
+
"karma": "~6.3.0",
|
|
54
|
+
"karma-chrome-launcher": "~3.1.0",
|
|
55
|
+
"karma-coverage": "~2.1.0",
|
|
56
|
+
"karma-jasmine": "~4.0.0",
|
|
57
|
+
"karma-jasmine-html-reporter": "~1.7.0",
|
|
58
|
+
"typescript": "~4.6.2"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Could not find the route you requested.
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="login-container">
|
|
2
|
+
<ng-container *ngIf="currentUser$ | async as user">
|
|
3
|
+
<img class="profile" [src]="user.photoURL" />
|
|
4
|
+
<h2>Hello {{user.name}}!</h2>
|
|
5
|
+
<input type="submit" value="Logout" (click)="logout$.next()">
|
|
6
|
+
</ng-container>
|
|
7
|
+
<ng-container *ngIf="(currentUser$ | async) === null">
|
|
8
|
+
<h2>Hello!</h2>
|
|
9
|
+
<input type="submit" value="Login" (click)="login$.next()">
|
|
10
|
+
</ng-container>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.login-container {
|
|
2
|
+
max-width: 430px;
|
|
3
|
+
padding: 40px 0;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
border: 1px solid #E7E7E7;
|
|
9
|
+
box-shadow: 0px 5px 9px rgba(0, 0, 0, 0.02);
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
margin: 40px auto;
|
|
12
|
+
|
|
13
|
+
.profile {
|
|
14
|
+
width: 95px;
|
|
15
|
+
height: 95px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
background: #D8D8D8;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
input {
|
|
21
|
+
margin-top: 30px;
|
|
22
|
+
width: 115px;
|
|
23
|
+
height: 42px;
|
|
24
|
+
background: #FAFAFA;
|
|
25
|
+
border: 1px solid #E1E1E1;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title><%= classify(project) %></title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
|
11
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
12
|
+
|
|
13
|
+
<!-- External scripts -->
|
|
14
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
|
|
15
|
+
</head>
|
|
16
|
+
<body class="mat-typography">
|
|
17
|
+
<app-root></app-root>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
|
2
|
+
|
|
3
|
+
html, body, app-root {
|
|
4
|
+
height: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
*, *:before, *:after {
|
|
12
|
+
box-sizing: inherit;
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.init = void 0;
|
|
13
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
|
+
//import { InsertChange } from '@schematics/angular/utility/change';
|
|
15
|
+
//import { buildRelativePath, findModuleFromOptions } from '@schematics/angular/utility/find-module';
|
|
16
|
+
//import { parseName } from '@schematics/angular/utility/parse-name';
|
|
17
|
+
//import { validateHtmlSelector } from '@schematics/angular/utility/validation';
|
|
18
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
19
|
+
const core_1 = require("@angular-devkit/core");
|
|
20
|
+
//import { getSourceText, simpleInsert } from '../shared/statements-adder';
|
|
21
|
+
function init(options) {
|
|
22
|
+
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
// Warn them that this should only be used on a new repo and ask if they want to proceed
|
|
24
|
+
if (!options.proceed) {
|
|
25
|
+
context.logger.info("Cancelling generation request. This schematic should only be used to generate initial files on FRESH repos created from ng new.");
|
|
26
|
+
return (0, schematics_1.noop)();
|
|
27
|
+
}
|
|
28
|
+
context.logger.info(`options.project: ${options.project}`);
|
|
29
|
+
const workspace = yield (0, workspace_1.getWorkspace)(tree);
|
|
30
|
+
const project = workspace.projects.get(options.project);
|
|
31
|
+
if (!project) {
|
|
32
|
+
throw new schematics_1.SchematicsException(`Project "${options.project}" does not exist.`);
|
|
33
|
+
}
|
|
34
|
+
context.logger.info(`project: ${project}`);
|
|
35
|
+
options.path = (0, workspace_1.buildDefaultPath)(project);
|
|
36
|
+
context.logger.info(`options.path: ${options.path}`);
|
|
37
|
+
//const parsedPath = parseName(options.path as string, options.name);
|
|
38
|
+
//options.name = parsedPath.name;
|
|
39
|
+
//options.path = parsedPath.path;
|
|
40
|
+
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
41
|
+
(0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
42
|
+
//move(parsedPath.path),
|
|
43
|
+
]);
|
|
44
|
+
return (0, schematics_1.chain)([
|
|
45
|
+
(0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite)
|
|
46
|
+
]);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
exports.init =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