/
_package.json
233 lines (233 loc) · 8.09 KB
/
_package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<% const run = command => `${props.packageManager} run ${command}${props.packageManager === 'npm' ? ' -s' : ''}` -%>
{
"name": "<%= props.projectName %>",
"version": "1.0.0",
"private": true,
<% if (props.target.includes('electron')) { -%>
"main": "electron.main.js",
<% } -%>
"scripts": {
"ng": "ng",
"build": "<%= run('env') %> && ng build --prod",
"start": "<%= run('env') %> && ng serve --proxy-config proxy.conf.js",
<% if (props.deploy !== 'none') { -%>
"deploy": "<%= run('env') %> && ng deploy",
<% } -%>
<% if (props.pwa) { -%>
"serve:sw": "<%= run('build') %> && npx http-server ./<%= props.target.includes('cordova') ? 'www': 'dist' %> -p 4200",
<% } -%>
"lint": "ng lint && stylelint \"src/**/*.scss\" --syntax scss && htmlhint \"src\" --config .htmlhintrc",
"test": "<%= run('env') %> && ng test",
"test:ci": "<%= run('env') %> && <%= run('lint') %> && ng test --configuration=ci",
"e2e": "<%= run('env') %> && ng e2e",
"translations:extract": "ngx-translate-extract --input ./src --output ./src/translations/template.json --format=json --clean --sort --marker extract",
<% if (props.tools.includes('hads')) { -%>
"docs": "hads ./docs -o",
<% } -%>
<% if (props.tools.includes('compodoc')) { -%>
"compodoc": "compodoc -p tsconfig.json -d docs/generated -s -o",
<% } -%>
"env": "ngx-scripts env npm_package_version",
<% if (props.tools.includes('prettier')) { -%>
"prettier": "prettier --write \"./{src,e2e}/**/*.{ts,js,html,scss}\"",
"prettier:check": "prettier --list-different \"./{src,e2e}/**/*.{ts,js,html,scss}\"",
"postinstall": "<%= run('prettier') %>",
<% } -%>
<% if (props.target.includes('cordova')) { -%>
"cordova:prepare": "ngx-scripts cordova prepare",
"cordova:run": "ngx-scripts cordova run",
"cordova:build": "ngx-scripts cordova build --device --release --copy dist",
"cordova:clean": "ngx-scripts clean",
"cordova": "cordova",
<% } -%>
<% if (props.target.includes('electron')) { -%>
"electron:compile": "tsc --project tsconfig.electron.json",
"electron:run": "<%= run('electron:compile') %> && electron .",
"electron:build": "<%= run('electron:compile') %> && <%= run('env') %> && ng build --prod --base-href ./dist.electron --output-path dist.electron",
"electron:package:common": "electron-packager . --overwrite --out=dist.packages --ignore=\"/(platforms|plugins|docs|www|reports|e2e|src)\"",
<% if (props.desktop.includes('windows')) { -%>
"electron:package:windows": "<%= run('electron:package:common') %> -- --platform=win32 --arch=x64 --icon=./resources/win/icon.ico",
<% } -%>
<% if (props.desktop.includes('mac')) { -%>
"electron:package:mac": "<%= run('electron:package:common') %> -- --platform=darwin --icon=./resources/mac/icon.icns",
<% } -%>
<% if (props.desktop.includes('linux')) { -%>
"electron:package:linux": "<%= run('electron:package:common') %> --platform=linux",
<% } -%>
"electron:package": "<%- props.desktop.reduce((out, platform) => (out ? out + ' && ' : '') + run('electron:package:' + platform), null) %>",
<% } -%>
"generate": "ng generate"
},
"dependencies": {
"@angular/animations": "^10.0.14",
"@angular/common": "^10.0.14",
"@angular/compiler": "^10.0.14",
"@angular/core": "^10.0.14",
"@angular/forms": "^10.0.14",
<% if (props.ui === 'bootstrap' || props.ui === 'material') { -%>
"@angular/localize": "^10.0.14",
<% } -%>
"@angular/platform-browser": "^10.0.14",
"@angular/platform-browser-dynamic": "^10.0.14",
"@angular/router": "^10.0.14",
"@ngx-translate/core": "^13.0.0",
<% if (props.target.includes('cordova')) { -%>
"@ionic-native/core": "^5.28.0",
"@ionic-native/keyboard": "^5.28.0",
"@ionic-native/splash-screen": "^5.28.0",
"@ionic-native/status-bar": "^5.28.0",
"cordova-android": "^9.0.0",
"cordova-custom-config": "^5.1.0",
"cordova-ios": "^6.1.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
<% } -%>
<% if (props.pwa) { -%>
"@angular/service-worker": "^10.0.14",
<% } -%>
<% if (props.ui === 'ionic') { -%>
"@ionic/angular": "^5.3.2",
<% } else if (props.ui === 'bootstrap') { -%>
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"bootstrap": "^4.5.2",
"@fortawesome/fontawesome-free": "^5.14.0",
<% } else if (props.ui === 'material') { -%>
"@angular/cdk": "^10.1.3",
"@angular/material": "^10.1.3",
"@angular/flex-layout": "^10.0.0-beta.32",
"material-design-icons-iconfont": "^6.0.1",
<% } -%>
<% if (props.angulartics) { -%>
"angulartics2": "^10.0.0",
<% } -%>
<% if (props.utility.includes('lodash')) { -%>
"lodash": "^4.17.20",
<% } -%>
<% if (props.utility.includes('ramda')) { -%>
"ramda": "^0.27.1",
<% } -%>
<% if (props.utility.includes('moment')) { -%>
"moment": "^2.27.0",
<% } -%>
<% if (props.utility.includes('datefns')) { -%>
"date-fns": "^2.16.0",
<% } -%>
"rxjs": "^6.6.2",
"tslib": "^2.0.1",
"zone.js": "^0.11.1"
},
"devDependencies": {
<% if (props.target.includes('cordova')) { -%>
"cordova": "^10.0.0",
<% } -%>
<% if (props.tools.includes('jest')) { -%>
"@angular-builders/jest": "^10.0.0",
<% } -%>
"@angular/cli": "~10.0.8",
"@angular/compiler-cli": "^10.0.14",
"@angular/language-service": "^10.0.14",
"@angular-devkit/build-angular": "^0.1000.8",
"@angularclass/hmr": "^3.0.0",
"@biesbjerg/ngx-translate-extract": "^4.2.0",
"@ngx-rocket/scripts": "^4.0.0",
"@types/jasmine": "^3.5.14",
"@types/jasminewd2": "^2.0.8",
<% if (props.tools.includes('jest')) { -%>
"@types/jest": "^26.0.10",
<% } -%>
"@types/node": "^12.12.54",
<% if (props.utility.includes('lodash')) { -%>
"@types/lodash": "^4.14.161",
<% } -%>
<% if (props.utility.includes('ramda')) { -%>
"@types/ramda": "^0.27.14",
<% } -%>
"codelyzer": "^6.0.0",
<% if (props.target.includes('electron')) { -%>
"electron": "^10.1.0",
"electron-packager": "^15.1.0",
"electron-reload": "^1.5.0",
<% } -%>
<% if (props.tools.includes('hads')) { -%>
"hads": "^2.1.0",
<% } -%>
<% if (props.tools.includes('compodoc')) { -%>
"@compodoc/compodoc": "^1.1.11",
<% } -%>
"htmlhint": "^0.14.1",
"https-proxy-agent": "^5.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.1",
<% if (props.tools.includes('jest')) { -%>
"jest": "^25.1.0",
<% } else { -%>
"karma": "~5.1.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-junit-reporter": "^2.0.1",
<% } -%>
<% if (props.tools.includes('prettier')) { -%>
"prettier": "^2.1.1",
"tslint-config-prettier": "^1.18.0",
"stylelint-config-prettier": "^8.0.2",
<% if (options.git) { -%>
"pretty-quick": "^3.0.0",
"husky": "^4.2.5",
<% } -%>
<% } -%>
"protractor": "~7.0.0",
<% if (props.tools.includes('puppeteer')) { -%>
"puppeteer": "^5.2.1",
<% } -%>
"stylelint": "~13.6.1",
"stylelint-config-recommended-scss": "~4.2.0",
"stylelint-config-standard": "~20.0.0",
"stylelint-scss": "~3.18.0",
"ts-node": "^9.0.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
<% if (props.tools.includes('prettier')) { -%>
},
"prettier": {
"singleQuote": true,
"overrides": [
{
"files": "*.scss",
"options": {
"singleQuote": false
}
}
]
<% } -%>
<% if (props.tools.includes('prettier') && options.git) { -%>
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
<% } -%>
<% if (props.target.includes('cordova')) { -%>
},
"cordova": {
"platforms": [
"android",
"ios"
],
"plugins": {
"cordova-custom-config": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
}
<% } -%>
}
}