@ihk-gfi/lux-components-update 11.13.0 → 13.0.1

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.
Files changed (230) hide show
  1. package/README.md +2 -4
  2. package/package.json +14 -17
  3. package/src/add-lux-components/files/app/app.component.html +1 -1
  4. package/src/add-lux-components/files/app/app.component.ts +4 -1
  5. package/src/add-lux-components/files/locale/messages.en.xlf +489 -235
  6. package/src/add-lux-components/files/locale/messages.xlf +451 -218
  7. package/src/add-lux-components/files/scripts/.browserslistrc +10 -7
  8. package/src/add-lux-components/files/src/index.html +31 -0
  9. package/src/add-lux-components/index.js +151 -78
  10. package/src/add-lux-components/index.js.map +1 -1
  11. package/src/add-lux-components/index.ts +141 -66
  12. package/src/add-lux-components/index_spec.js +4 -4
  13. package/src/add-lux-components/index_spec.js.map +1 -1
  14. package/src/add-lux-components/index_spec.ts +1 -1
  15. package/src/add-lux-components/schema.json +1 -1
  16. package/src/collection.json +8 -88
  17. package/src/update-dependencies/index.d.ts +1 -1
  18. package/src/update-dependencies/index.js +82 -65
  19. package/src/update-dependencies/index.js.map +1 -1
  20. package/src/update-dependencies/index.ts +112 -95
  21. package/src/update-dependencies/schema.json +1 -1
  22. package/src/update-en-messages/index.d.ts +2 -0
  23. package/src/update-en-messages/index.js +75 -0
  24. package/src/update-en-messages/index.js.map +1 -0
  25. package/src/update-en-messages/index.ts +78 -0
  26. package/src/{update110100 → update-en-messages}/schema.json +3 -3
  27. package/src/updates/update130000/files/root/.browserslistrc +20 -0
  28. package/src/updates/update130000/index.d.ts +27 -0
  29. package/src/updates/update130000/index.js +296 -0
  30. package/src/updates/update130000/index.js.map +1 -0
  31. package/src/updates/update130000/index.ts +346 -0
  32. package/src/{migrate-to-eslint → updates/update130000}/index_spec.d.ts +0 -0
  33. package/src/updates/update130000/index_spec.js +574 -0
  34. package/src/updates/update130000/index_spec.js.map +1 -0
  35. package/src/updates/update130000/index_spec.ts +665 -0
  36. package/src/{update → updates/update130000}/schema.json +1 -1
  37. package/src/utility/dependencies.js +16 -14
  38. package/src/utility/dependencies.js.map +1 -1
  39. package/src/utility/dependencies.ts +6 -4
  40. package/src/utility/files.d.ts +5 -1
  41. package/src/utility/files.js +27 -16
  42. package/src/utility/files.js.map +1 -1
  43. package/src/utility/files.ts +16 -3
  44. package/src/utility/html.js +88 -25
  45. package/src/utility/html.js.map +1 -1
  46. package/src/utility/html.ts +105 -29
  47. package/src/{migrate-to-webcomponent/index_spec.d.ts → utility/html_spec.d.ts} +0 -0
  48. package/src/utility/html_spec.js +560 -0
  49. package/src/utility/html_spec.js.map +1 -0
  50. package/src/utility/html_spec.ts +575 -0
  51. package/src/utility/json.d.ts +46 -1
  52. package/src/utility/json.js +174 -4
  53. package/src/utility/json.js.map +1 -1
  54. package/src/utility/json.ts +198 -3
  55. package/src/{update/index_spec.d.ts → utility/json_spec.d.ts} +0 -0
  56. package/src/utility/json_spec.js +326 -0
  57. package/src/utility/json_spec.js.map +1 -0
  58. package/src/utility/json_spec.ts +376 -0
  59. package/src/utility/typescript.js +16 -16
  60. package/src/utility/typescript.js.map +1 -1
  61. package/src/utility/typescript_spec.js +36 -36
  62. package/src/utility/typescript_spec.js.map +1 -1
  63. package/src/utility/util.d.ts +2 -2
  64. package/src/utility/util.js +16 -14
  65. package/src/utility/util.js.map +1 -1
  66. package/src/utility/util.ts +7 -5
  67. package/src/utility/validation.js +11 -11
  68. package/src/utility/validation.js.map +1 -1
  69. package/src/migrate-to-eslint/files/.eslintrc.json +0 -68
  70. package/src/migrate-to-eslint/files/.prettierrc +0 -25
  71. package/src/migrate-to-eslint/index.d.ts +0 -6
  72. package/src/migrate-to-eslint/index.js +0 -149
  73. package/src/migrate-to-eslint/index.js.map +0 -1
  74. package/src/migrate-to-eslint/index.ts +0 -181
  75. package/src/migrate-to-eslint/index_spec.js +0 -129
  76. package/src/migrate-to-eslint/index_spec.js.map +0 -1
  77. package/src/migrate-to-eslint/index_spec.ts +0 -152
  78. package/src/migrate-to-eslint/schema.json +0 -23
  79. package/src/migrate-to-webcomponent/index.d.ts +0 -10
  80. package/src/migrate-to-webcomponent/index.js +0 -278
  81. package/src/migrate-to-webcomponent/index.js.map +0 -1
  82. package/src/migrate-to-webcomponent/index.ts +0 -331
  83. package/src/migrate-to-webcomponent/index_spec.js +0 -580
  84. package/src/migrate-to-webcomponent/index_spec.js.map +0 -1
  85. package/src/migrate-to-webcomponent/index_spec.ts +0 -703
  86. package/src/migrate-to-webcomponent/schema.json +0 -23
  87. package/src/update/files/locale/messages.en.xlf +0 -940
  88. package/src/update/files/locale/messages.xlf +0 -815
  89. package/src/update/files/scripts/move-de-files.js +0 -15
  90. package/src/update/index.d.ts +0 -23
  91. package/src/update/index.js +0 -635
  92. package/src/update/index.js.map +0 -1
  93. package/src/update/index.ts +0 -712
  94. package/src/update/index_spec.js +0 -984
  95. package/src/update/index_spec.js.map +0 -1
  96. package/src/update/index_spec.ts +0 -1139
  97. package/src/update110001/index.d.ts +0 -2
  98. package/src/update110001/index.js +0 -42
  99. package/src/update110001/index.js.map +0 -1
  100. package/src/update110001/index.ts +0 -40
  101. package/src/update110001/index_spec.d.ts +0 -1
  102. package/src/update110001/index_spec.js +0 -67
  103. package/src/update110001/index_spec.js.map +0 -1
  104. package/src/update110001/index_spec.ts +0 -72
  105. package/src/update110001/schema.json +0 -23
  106. package/src/update110100/index.d.ts +0 -2
  107. package/src/update110100/index.js +0 -27
  108. package/src/update110100/index.js.map +0 -1
  109. package/src/update110100/index.ts +0 -24
  110. package/src/update110100/index_spec.d.ts +0 -1
  111. package/src/update110100/index_spec.js +0 -69
  112. package/src/update110100/index_spec.js.map +0 -1
  113. package/src/update110100/index_spec.ts +0 -73
  114. package/src/update110101/index.d.ts +0 -2
  115. package/src/update110101/index.js +0 -24
  116. package/src/update110101/index.js.map +0 -1
  117. package/src/update110101/index.ts +0 -21
  118. package/src/update110101/index_spec.d.ts +0 -1
  119. package/src/update110101/index_spec.js +0 -65
  120. package/src/update110101/index_spec.js.map +0 -1
  121. package/src/update110101/index_spec.ts +0 -69
  122. package/src/update110101/schema.json +0 -23
  123. package/src/update110200/index.d.ts +0 -2
  124. package/src/update110200/index.js +0 -24
  125. package/src/update110200/index.js.map +0 -1
  126. package/src/update110200/index.ts +0 -21
  127. package/src/update110200/index_spec.d.ts +0 -1
  128. package/src/update110200/index_spec.js +0 -65
  129. package/src/update110200/index_spec.js.map +0 -1
  130. package/src/update110200/index_spec.ts +0 -69
  131. package/src/update110200/schema.json +0 -23
  132. package/src/update110300/index.d.ts +0 -2
  133. package/src/update110300/index.js +0 -133
  134. package/src/update110300/index.js.map +0 -1
  135. package/src/update110300/index.ts +0 -148
  136. package/src/update110300/index_spec.d.ts +0 -1
  137. package/src/update110300/index_spec.js +0 -121
  138. package/src/update110300/index_spec.js.map +0 -1
  139. package/src/update110300/index_spec.ts +0 -139
  140. package/src/update110300/schema.json +0 -23
  141. package/src/update110400/index.d.ts +0 -2
  142. package/src/update110400/index.js +0 -28
  143. package/src/update110400/index.js.map +0 -1
  144. package/src/update110400/index.ts +0 -28
  145. package/src/update110400/index_spec.d.ts +0 -1
  146. package/src/update110400/index_spec.js +0 -66
  147. package/src/update110400/index_spec.js.map +0 -1
  148. package/src/update110400/index_spec.ts +0 -70
  149. package/src/update110400/schema.json +0 -23
  150. package/src/update110500/index.d.ts +0 -2
  151. package/src/update110500/index.js +0 -28
  152. package/src/update110500/index.js.map +0 -1
  153. package/src/update110500/index.ts +0 -28
  154. package/src/update110500/index_spec.d.ts +0 -1
  155. package/src/update110500/index_spec.js +0 -66
  156. package/src/update110500/index_spec.js.map +0 -1
  157. package/src/update110500/index_spec.ts +0 -70
  158. package/src/update110500/schema.json +0 -23
  159. package/src/update110600/index.d.ts +0 -2
  160. package/src/update110600/index.js +0 -28
  161. package/src/update110600/index.js.map +0 -1
  162. package/src/update110600/index.ts +0 -28
  163. package/src/update110600/index_spec.d.ts +0 -1
  164. package/src/update110600/index_spec.js +0 -66
  165. package/src/update110600/index_spec.js.map +0 -1
  166. package/src/update110600/index_spec.ts +0 -70
  167. package/src/update110600/schema.json +0 -23
  168. package/src/update110700/index.d.ts +0 -2
  169. package/src/update110700/index.js +0 -45
  170. package/src/update110700/index.js.map +0 -1
  171. package/src/update110700/index.ts +0 -47
  172. package/src/update110700/index_spec.d.ts +0 -1
  173. package/src/update110700/index_spec.js +0 -108
  174. package/src/update110700/index_spec.js.map +0 -1
  175. package/src/update110700/index_spec.ts +0 -122
  176. package/src/update110700/schema.json +0 -23
  177. package/src/update110800/index.d.ts +0 -2
  178. package/src/update110800/index.js +0 -32
  179. package/src/update110800/index.js.map +0 -1
  180. package/src/update110800/index.ts +0 -33
  181. package/src/update110800/index_spec.d.ts +0 -1
  182. package/src/update110800/index_spec.js +0 -70
  183. package/src/update110800/index_spec.js.map +0 -1
  184. package/src/update110800/index_spec.ts +0 -75
  185. package/src/update110800/schema.json +0 -23
  186. package/src/update110900/index.d.ts +0 -4
  187. package/src/update110900/index.js +0 -111
  188. package/src/update110900/index.js.map +0 -1
  189. package/src/update110900/index.ts +0 -123
  190. package/src/update110900/index_spec.d.ts +0 -1
  191. package/src/update110900/index_spec.js +0 -311
  192. package/src/update110900/index_spec.js.map +0 -1
  193. package/src/update110900/index_spec.ts +0 -341
  194. package/src/update110900/schema.json +0 -23
  195. package/src/update111000/index.d.ts +0 -2
  196. package/src/update111000/index.js +0 -27
  197. package/src/update111000/index.js.map +0 -1
  198. package/src/update111000/index.ts +0 -27
  199. package/src/update111000/index_spec.d.ts +0 -1
  200. package/src/update111000/index_spec.js +0 -65
  201. package/src/update111000/index_spec.js.map +0 -1
  202. package/src/update111000/index_spec.ts +0 -70
  203. package/src/update111000/schema.json +0 -23
  204. package/src/update111100/index.d.ts +0 -2
  205. package/src/update111100/index.js +0 -389
  206. package/src/update111100/index.js.map +0 -1
  207. package/src/update111100/index.ts +0 -405
  208. package/src/update111100/index_spec.d.ts +0 -1
  209. package/src/update111100/index_spec.js +0 -66
  210. package/src/update111100/index_spec.js.map +0 -1
  211. package/src/update111100/index_spec.ts +0 -70
  212. package/src/update111100/schema.json +0 -23
  213. package/src/update111200/index.d.ts +0 -2
  214. package/src/update111200/index.js +0 -59
  215. package/src/update111200/index.js.map +0 -1
  216. package/src/update111200/index.ts +0 -75
  217. package/src/update111200/index_spec.d.ts +0 -1
  218. package/src/update111200/index_spec.js +0 -67
  219. package/src/update111200/index_spec.js.map +0 -1
  220. package/src/update111200/index_spec.ts +0 -71
  221. package/src/update111200/schema.json +0 -23
  222. package/src/update111300/index.d.ts +0 -2
  223. package/src/update111300/index.js +0 -27
  224. package/src/update111300/index.js.map +0 -1
  225. package/src/update111300/index.ts +0 -27
  226. package/src/update111300/index_spec.d.ts +0 -1
  227. package/src/update111300/index_spec.js +0 -65
  228. package/src/update111300/index_spec.js.map +0 -1
  229. package/src/update111300/index_spec.ts +0 -69
  230. package/src/update111300/schema.json +0 -23
@@ -3,61 +3,104 @@ import * as chalk from 'chalk';
3
3
  import { applyEdits, Edit, modify } from 'jsonc-parser';
4
4
  import { updateDependencies } from '../update-dependencies/index';
5
5
  import {
6
- addThemeAssets,
7
- i18nCopyMessages,
8
- i18nUpdateAngularJson,
9
- i18nUpdatePackageJson,
10
- updateAppComponent,
6
+ updateBuildThemeAssets,
7
+ copyFiles,
11
8
  updateMajorVersion,
12
- updateNodeMinVersion
13
- } from '../update/index';
14
- import { update110001 } from '../update110001/index';
15
- import { update110100 } from '../update110100/index';
16
- import { update110101 } from '../update110101/index';
17
- import { update110200 } from '../update110200/index';
18
- import { update110300 } from '../update110300/index';
19
- import { update110400 } from '../update110400/index';
20
- import { update110500 } from '../update110500';
21
- import { update110600 } from '../update110600/index';
22
- import { update110700 } from '../update110700/index';
23
- import { update110800 } from '../update110800/index';
24
- import { update110900 } from '../update110900/index';
25
- import { update111000 } from '../update111000/index';
26
- import { update111100 } from '../update111100/index';
9
+ updateNodeMinVersion,
10
+ updateTestThemeAssets
11
+ } from '../updates/update130000/index';
27
12
  import { iterateFilesAndModifyContent, moveFilesToDirectory } from '../utility/files';
28
- import { jsonFormattingOptions, readJson, readJsonAsString } from '../utility/json';
13
+ import {
14
+ findObjectPropertyInArray,
15
+ jsonFormattingOptions,
16
+ readJson,
17
+ readJsonAsString,
18
+ updateJsonArray,
19
+ updateJsonValue
20
+ } from '../utility/json';
29
21
  import { logInfo } from '../utility/logging';
30
22
  import { finish, messageInfoRule, messageSuccessRule, replaceAll, waitForTreeCallback } from '../utility/util';
31
23
  import { validateAngularVersion, validateNodeVersion } from '../utility/validation';
32
24
 
33
25
  export function addLuxComponents(options: any): Rule {
34
26
  return (tree: Tree, _context: SchematicContext) => {
27
+ const jsonPathAllowedCommonJS = ['projects', options.project, 'architect', 'build', 'options', 'allowedCommonJsDependencies'];
28
+ const jsonPathBudget = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'budgets'];
29
+ const budgetValue = {
30
+ "type": "initial",
31
+ "maximumWarning": "1mb",
32
+ "maximumError": "2mb"
33
+ };
34
+
35
+ const jsonPathAssetsBuild = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
36
+ const jsonPathAssetsTest = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
37
+ const assetsValues = [
38
+ {
39
+ glob: '*(*min.css|*min.css.map)',
40
+ input: './node_modules/@ihk-gfi/lux-components-theme/prebuilt-themes',
41
+ output: './assets/themes'
42
+ },
43
+ {
44
+ glob: "all.css",
45
+ input: "./node_modules/@fortawesome/fontawesome-free/css",
46
+ output: "./assets/icons/fontawesome/css"
47
+ },
48
+ {
49
+ glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
50
+ input: "./node_modules/@fortawesome/fontawesome-free/webfonts",
51
+ output: "./assets/icons/fontawesome/webfonts"
52
+ },
53
+ {
54
+ glob: "material-design-icons.css*",
55
+ input: "./node_modules/material-design-icons-iconfont/dist",
56
+ output: "./assets/icons/material-icons"
57
+ },
58
+ {
59
+ glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
60
+ input: "./node_modules/material-design-icons-iconfont/dist/fonts",
61
+ output: "./assets/icons/material-icons/fonts"
62
+ }
63
+ ];
64
+
65
+ const jsonPathOptimization = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'optimization'];
66
+ const jsonValueOptimization = {
67
+ "scripts": true,
68
+ "styles": {
69
+ "minify": true,
70
+ "inlineCritical": false
71
+ },
72
+ "fonts": true
73
+ };
74
+
75
+ const findBudgetFn = (node) => findObjectPropertyInArray(node, 'type', 'initial');
76
+
35
77
  return chain([
36
78
  check(),
37
79
  copyAppFiles(options),
38
80
  updatePackageJson(options),
39
81
  updateDependencies(),
40
- addThemeAssets(options),
41
- updateAppComponent(options),
82
+
42
83
  updateIndexHtml(options),
43
- i18nUpdatePackageJson(options),
44
- i18nUpdateAngularJson(options),
45
- i18nCopyMessages(options),
84
+ copyFiles(options),
46
85
  updateApp(options),
47
- update110001(options),
48
- update110100(options),
49
- update110101(options),
50
- update110200(options),
51
- update110300(options),
52
- update110400(options),
53
- update110500(options),
54
- update110600(options),
55
- update110700(options),
56
- update110800(options),
57
- update110900(options),
58
- update111000(options),
59
- update111100(options),
86
+ updateJsonValue(options, '/tsconfig.json', ['compilerOptions', 'strict'], false),
87
+ updateJsonValue(options, '/angular.json', jsonPathOptimization, jsonValueOptimization),
88
+ updateJsonArray(options, '/angular.json', jsonPathBudget, budgetValue, true, findBudgetFn),
89
+ updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[0]),
90
+ updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[0]),
91
+ updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[1]),
92
+ updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[1]),
93
+ updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[2]),
94
+ updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[2]),
95
+ updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[3]),
96
+ updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[3]),
97
+ updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[4]),
98
+ updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[4]),
99
+ updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'hammerjs'),
100
+ updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'ng2-pdf-viewer'),
101
+ updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'pdfjs-dist'),
60
102
  finish(
103
+ true,
61
104
  `Die LUX-Components ${updateMajorVersion} wurden erfolgreich eingerichtet.`,
62
105
  `${chalk.yellowBright('Fertig!')}`
63
106
  )
@@ -86,18 +129,40 @@ export function updatePackageJson(options: any): Rule {
86
129
  const filePath = `/package.json`;
87
130
 
88
131
  const newValuesArr = [
89
- { path: ['scripts', 'test_single_run'], value: 'ng test --watch=false --browsers=ChromeHeadless', message: `Skript "test_single_run" hinzugefügt.`},
90
- { path: ['scripts', 'smoketest'], value: 'npm run test_single_run && npm run build && npm run lint --bailOnLintError true', message: `Skript "smoketest" hinzugefügt.`}
132
+ {
133
+ path: ['scripts', 'build-prod'],
134
+ value: 'ng build --configuration production --localize && npm run move-de-files',
135
+ message: `Skript "build-prod" hinzugefügt.`
136
+ },
137
+ {
138
+ path: ['scripts', 'test-headless'],
139
+ value: 'ng test --watch=false --browsers=ChromeHeadless --code-coverage=true',
140
+ message: `Skript "test-headless" hinzugefügt.`
141
+ },
142
+ {
143
+ path: ['scripts', 'smoketest'],
144
+ value: 'npm run build-prod && npm run test-headless && npm run xi18n',
145
+ message: `Skript "smoketest" hinzugefügt.`
146
+ },
147
+ {
148
+ path: ['scripts', 'move-de-files'],
149
+ value: 'node move-de-files.js',
150
+ message: `Skript "move-de-files" hinzugefügt.`
151
+ },
152
+ {
153
+ path: ['scripts', 'xi18n'],
154
+ value: 'ng extract-i18n --output-path src/locale',
155
+ message: `Skript "xi18n" hinzugefügt.`
156
+ }
91
157
  ];
92
158
 
93
- newValuesArr.forEach(change => {
159
+ newValuesArr.forEach((change) => {
94
160
  const tsConfigJson = readJsonAsString(tree, filePath);
95
- const edits: Edit[] = modify(tsConfigJson, change.path, change.value, { formattingOptions: jsonFormattingOptions })
161
+ const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
162
+ formattingOptions: jsonFormattingOptions
163
+ });
96
164
 
97
- tree.overwrite(
98
- filePath,
99
- applyEdits(tsConfigJson, edits)
100
- );
165
+ tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
101
166
 
102
167
  logInfo(change.message);
103
168
  });
@@ -147,22 +212,29 @@ export function updateApp(options: any): Rule {
147
212
  const filePath = `/package.json`;
148
213
 
149
214
  const newValuesArr = [
150
- { path: ['scripts', 'move-de-files'], value: 'node move-de-files.js', message: `Skript "move-de-files" hinzugefügt.`},
151
- { path: ['scripts', 'build'], value: 'ng build --aot --localize && npm run move-de-files', message: `Skript "build" angepasst.`},
152
- { path: ['scripts', 'build-aot'], value: undefined, message: ``},
153
- { path: ['scripts', 'buildzentral'], value: undefined, message: ``},
154
- { path: ['devDependencies', 'fs-extra'], value: '^10.0.0', message: `devDependencies "fs-extra" hinzugefügt.`},
155
- { path: ['devDependencies', 'del'], value: '^6.0.0', message: `devDependencies "del" hinzugefügt.`}
215
+ {
216
+ path: ['scripts', 'move-de-files'],
217
+ value: 'node move-de-files.js',
218
+ message: `Skript "move-de-files" hinzugefügt.`
219
+ },
220
+ {
221
+ path: ['scripts', 'build'],
222
+ value: 'ng build --aot --localize && npm run move-de-files',
223
+ message: `Skript "build" angepasst.`
224
+ },
225
+ { path: ['scripts', 'build-aot'], value: undefined, message: `` },
226
+ { path: ['scripts', 'buildzentral'], value: undefined, message: `` },
227
+ { path: ['devDependencies', 'fs-extra'], value: '^10.0.0', message: `devDependencies "fs-extra" hinzugefügt.` },
228
+ { path: ['devDependencies', 'del'], value: '^6.0.0', message: `devDependencies "del" hinzugefügt.` }
156
229
  ];
157
230
 
158
- newValuesArr.forEach(change => {
231
+ newValuesArr.forEach((change) => {
159
232
  const tsConfigJson = readJsonAsString(tree, filePath);
160
- const edits: Edit[] = modify(tsConfigJson, change.path, change.value, { formattingOptions: jsonFormattingOptions })
233
+ const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
234
+ formattingOptions: jsonFormattingOptions
235
+ });
161
236
 
162
- tree.overwrite(
163
- filePath,
164
- applyEdits(tsConfigJson, edits)
165
- );
237
+ tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
166
238
 
167
239
  logInfo(change.message);
168
240
  });
@@ -175,17 +247,20 @@ export function updateApp(options: any): Rule {
175
247
  const filePath = `/angular.json`;
176
248
 
177
249
  const newValuesArr = [
178
- { path: ['projects', options.project, 'architect', 'build', 'options', 'outputPath'], value: 'dist', message: `Property "outputPath" auf "dist" gesetzt.`},
250
+ {
251
+ path: ['projects', options.project, 'architect', 'build', 'options', 'outputPath'],
252
+ value: 'dist',
253
+ message: `Property "outputPath" auf "dist" gesetzt.`
254
+ }
179
255
  ];
180
256
 
181
- newValuesArr.forEach(change => {
257
+ newValuesArr.forEach((change) => {
182
258
  const tsConfigJson = readJsonAsString(tree, filePath);
183
- const edits: Edit[] = modify(tsConfigJson, change.path, change.value, { formattingOptions: jsonFormattingOptions })
259
+ const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
260
+ formattingOptions: jsonFormattingOptions
261
+ });
184
262
 
185
- tree.overwrite(
186
- filePath,
187
- applyEdits(tsConfigJson, edits)
188
- );
263
+ tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
189
264
 
190
265
  logInfo(change.message);
191
266
  });
@@ -13,7 +13,7 @@ const schematics_1 = require("@angular-devkit/schematics");
13
13
  const testing_1 = require("@angular-devkit/schematics/testing");
14
14
  const path = require("path");
15
15
  const rxjs_1 = require("rxjs");
16
- const update_1 = require("../update");
16
+ const update130000_1 = require("../updates/update130000");
17
17
  const dependencies_1 = require("../utility/dependencies");
18
18
  const test_1 = require("../utility/test");
19
19
  const util_1 = require("../utility/util");
@@ -40,9 +40,9 @@ describe('add-lux-components', () => {
40
40
  }));
41
41
  describe('[Rule] addLuxComponents', () => {
42
42
  it('Sollte die LUX-Components im Projekt eingerichtet haben', (done) => {
43
- dependencies_1.updatePackageJsonDependency(appTree, { type: dependencies_1.NodeDependencyType.Default, version: update_1.updateMajorVersion + '.0.0', name: '@angular/common' });
44
- schematics_1.callRule(index_1.addLuxComponents(testOptions), rxjs_1.of(appTree), context).subscribe(() => {
45
- expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toContain(update_1.updateMajorVersion);
43
+ (0, dependencies_1.updatePackageJsonDependency)(appTree, { type: dependencies_1.NodeDependencyType.Default, version: update130000_1.updateMajorVersion + '.0.0', name: '@angular/common' });
44
+ (0, schematics_1.callRule)((0, index_1.addLuxComponents)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
45
+ expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toContain(update130000_1.updateMajorVersion);
46
46
  done();
47
47
  }, (reason) => expect(reason).toBeUndefined());
48
48
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,sCAA+C;AAC/C,0DAAoH;AACpH,0CAA+D;AAC/D,0CAA6C;AAC7C,mCAA2C;AAE3C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAyB,CAAC;IAE9B,MAAM,WAAW,GAAQ,EAAE,CAAC;IAE5B,UAAU,CAAC,GAAS,EAAE;QACpB,MAAM,GAAG,IAAI,6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CAAC,eAAe,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;QAClF,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAEjD,WAAW,CAAC,OAAO,GAAG,iBAAU,CAAC,IAAI,CAAC;QACtC,WAAW,CAAC,IAAI,GAAG,uBAAgB,CAAC,cAAc,GAAG,GAAG,GAAG,iBAAU,CAAC,IAAI,CAAC;QAC3E,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B,CAAC,CAAA,CAAC,CAAC;IAEH,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,EAAE,CAAC,yDAAyD,EAAE,CAAC,IAAI,EAAE,EAAE;YACrE,IAAA,0CAA2B,EACzB,OAAO,EACP,EAAE,IAAI,EAAE,iCAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,iCAAkB,GAAG,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,CACpG,CAAC;YAEF,IAAA,qBAAQ,EAAC,IAAA,wBAAgB,EAAC,WAAW,CAAC,EAAE,IAAA,SAAY,EAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,CAC/E,GAAG,EAAE;gBACH,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,iCAAkB,CAAC,CAAC;gBAC3G,IAAI,EAAE,CAAC;YACT,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAC3C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -2,7 +2,7 @@ import { callRule, SchematicContext } from '@angular-devkit/schematics';
2
2
  import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
3
3
  import * as path from 'path';
4
4
  import { of as observableOf } from 'rxjs';
5
- import { updateMajorVersion } from '../update';
5
+ import { updateMajorVersion } from '../updates/update130000';
6
6
  import { getPackageJsonDependency, NodeDependencyType, updatePackageJsonDependency } from '../utility/dependencies';
7
7
  import { appOptions, workspaceOptions } from '../utility/test';
8
8
  import { UtilConfig } from '../utility/util';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
- "id": "addLuxComponentsSchema",
3
+ "$id": "addLuxComponentsSchema",
4
4
  "title": "Fügt die LUX-Components zum Projekt hinzu",
5
5
  "type": "object",
6
6
  "description": "Fügt die LUX-Components zum Projekt hinzu",
@@ -2,104 +2,24 @@
2
2
  "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
3
  "schematics": {
4
4
  "update": {
5
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.0.0",
6
- "factory": "./update/index#update",
7
- "schema": "./update/schema.json"
8
- },
9
- "update-11.0.1": {
10
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.0.1",
11
- "factory": "./update110001/index#update110001",
12
- "schema": "./update110001/schema.json"
13
- },
14
- "update-11.1.0": {
15
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.1.0",
16
- "factory": "./update110100/index#update110100",
17
- "schema": "./update110100/schema.json"
18
- },
19
- "update-11.1.1": {
20
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.1.1",
21
- "factory": "./update110101/index#update110101",
22
- "schema": "./update110101/schema.json"
23
- },
24
- "update-11.2.0": {
25
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.2.0",
26
- "factory": "./update110200/index#update110200",
27
- "schema": "./update110200/schema.json"
28
- },
29
- "update-11.3.0": {
30
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.3.0",
31
- "factory": "./update110300/index#update110300",
32
- "schema": "./update110300/schema.json"
33
- },
34
- "update-11.4.0": {
35
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.4.0",
36
- "factory": "./update110400/index#update110400",
37
- "schema": "./update110400/schema.json"
38
- },
39
- "update-11.5.0": {
40
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.5.0",
41
- "factory": "./update110500/index#update110500",
42
- "schema": "./update110500/schema.json"
43
- },
44
- "update-11.6.0": {
45
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.6.0",
46
- "factory": "./update110600/index#update110600",
47
- "schema": "./update110600/schema.json"
48
- },
49
- "update-11.7.0": {
50
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.7.0",
51
- "factory": "./update110700/index#update110700",
52
- "schema": "./update110700/schema.json"
53
- },
54
- "update-11.8.0": {
55
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.8.0",
56
- "factory": "./update110800/index#update110800",
57
- "schema": "./update110800/schema.json"
58
- },
59
- "update-11.9.0": {
60
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.9.0",
61
- "factory": "./update110900/index#update110900",
62
- "schema": "./update110900/schema.json"
63
- },
64
- "update-11.10.0": {
65
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.10.0",
66
- "factory": "./update111000/index#update111000",
67
- "schema": "./update111000/schema.json"
68
- },
69
- "update-11.11.0": {
70
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.11.0",
71
- "factory": "./update111100/index#update111100",
72
- "schema": "./update111100/schema.json"
73
- },
74
- "update-11.12.0": {
75
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.12.0",
76
- "factory": "./update111200/index#update111200",
77
- "schema": "./update111200/schema.json"
78
- },
79
- "update-11.13.0": {
80
- "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.13.0",
81
- "factory": "./update111300/index#update111300",
82
- "schema": "./update111300/schema.json"
5
+ "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 13.0.0",
6
+ "factory": "./updates/update130000/index#update",
7
+ "schema": "./updates/update130000/schema.json"
83
8
  },
84
9
  "update-dependencies": {
85
10
  "description": "Aktualisiert die Abhängigkeiten im LUX-Componentsprojekt",
86
11
  "factory": "./update-dependencies/index#updateDependencies",
87
12
  "schema": "./update-dependencies/schema.json"
88
13
  },
14
+ "update-en-messages": {
15
+ "description": "Aktualisiert die englischen Übersetzungen im Projekt",
16
+ "factory": "./update-en-messages/index#updateEnMessages",
17
+ "schema": "./update-en-messages/schema.json"
18
+ },
89
19
  "add-lux-components": {
90
20
  "description": "Fügt die LUX-Components zum Projekt hinzu",
91
21
  "factory": "./add-lux-components/index#addLuxComponents",
92
22
  "schema": "./add-lux-components/schema.json"
93
- },
94
- "migrate-to-eslint": {
95
- "description": "Bereitet das LUX-Componentsprojekt für die Migration auf ES-Lint vor",
96
- "factory": "./migrate-to-eslint/index#migrateToEsLint",
97
- "schema": "./migrate-to-eslint/schema.json"
98
- },
99
- "migrate-to-webcomponent": {
100
- "description": "LUX-Componentsprojekt wird zur Web Component umgebaut",
101
- "factory": "./migrate-to-webcomponent/index#migrateToWebcomponent",
102
- "schema": "./migrate-to-webcomponent/schema.json"
103
23
  }
104
24
  }
105
25
  }
@@ -2,4 +2,4 @@ import { Rule } from '@angular-devkit/schematics';
2
2
  export declare function updateDependencies(): Rule;
3
3
  export declare function updateDefaultDependencies(): Rule;
4
4
  export declare function updateDevDependencies(): Rule;
5
- export declare function deleteDevDependencies(): Rule;
5
+ export declare function deleteDependencies(): Rule;