@ihk-gfi/lux-components-update 14.8.0 → 15.0.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.
Files changed (225) hide show
  1. package/README.md +4 -2
  2. package/add-lux-components/files/app/app.component.html +34 -0
  3. package/{src/add-lux-components → add-lux-components}/files/app/app.component.spec.ts +4 -2
  4. package/{src/add-lux-components → add-lux-components}/files/app/app.component.ts +1 -1
  5. package/add-lux-components/files/src/main.ts +17 -0
  6. package/{src/add-lux-components → add-lux-components}/index.js +29 -30
  7. package/add-lux-components/schema.json +23 -0
  8. package/collection.json +35 -0
  9. package/package.json +27 -27
  10. package/{src/theme → theme}/change-theme-to-authentic/index.js +0 -1
  11. package/theme/change-theme-to-authentic/schema.json +23 -0
  12. package/{src/theme → theme}/change-to-lux-icons/index.js +0 -1
  13. package/theme/change-to-lux-icons/schema.json +23 -0
  14. package/{src/update-dependencies → update-dependencies}/index.d.ts +1 -0
  15. package/update-dependencies/index.js +92 -0
  16. package/update-dependencies/schema.json +23 -0
  17. package/{src/update-en-messages → update-en-messages}/index.js +0 -1
  18. package/update-en-messages/schema.json +23 -0
  19. package/updates/15.0.0/index.d.ts +8 -0
  20. package/updates/15.0.0/index.js +109 -0
  21. package/updates/15.0.0/schema.json +23 -0
  22. package/{src/utility → utility}/dependencies.js +0 -1
  23. package/{src/utility → utility}/files.js +0 -1
  24. package/{src/utility → utility}/html/hit.js +0 -1
  25. package/{src/utility → utility}/html/html-manipulator.js +0 -1
  26. package/{src/utility → utility}/html/manipulator-functions.js +0 -1
  27. package/{src/utility → utility}/json.d.ts +2 -0
  28. package/{src/utility → utility}/json.js +16 -8
  29. package/{src/utility → utility}/logging.js +0 -1
  30. package/{src/utility → utility}/test.js +0 -1
  31. package/{src/utility → utility}/typescript.js +0 -1
  32. package/{src/utility → utility}/util.js +0 -1
  33. package/{src/utility → utility}/validation.js +0 -1
  34. package/src/add-lux-components/files/app/app.component.html +0 -32
  35. package/src/add-lux-components/files/app/base/license-hint/license-hint.component.html +0 -7
  36. package/src/add-lux-components/files/app/base/license-hint/license-hint.component.ts +0 -18
  37. package/src/add-lux-components/files/app/error/error.component.html +0 -10
  38. package/src/add-lux-components/files/app/error/error.component.scss +0 -3
  39. package/src/add-lux-components/files/app/error/error.component.spec.ts +0 -49
  40. package/src/add-lux-components/files/app/error/error.component.ts +0 -17
  41. package/src/add-lux-components/files/app/home/home.component.html +0 -7
  42. package/src/add-lux-components/files/app/home/home.component.scss +0 -3
  43. package/src/add-lux-components/files/app/home/home.component.ts +0 -13
  44. package/src/add-lux-components/files/app/profil/profil.component.html +0 -1
  45. package/src/add-lux-components/files/app/profil/profil.component.scss +0 -0
  46. package/src/add-lux-components/files/app/profil/profil.component.spec.ts +0 -24
  47. package/src/add-lux-components/files/app/profil/profil.component.ts +0 -11
  48. package/src/add-lux-components/files/assets/svg/Example.svg +0 -6
  49. package/src/add-lux-components/files/assets/svg/android.svg +0 -2
  50. package/src/add-lux-components/files/assets/svg/box.svg +0 -690
  51. package/src/add-lux-components/files/assets/svg/demoAppLogo.svg +0 -1
  52. package/src/add-lux-components/files/assets/svg/red_power_button.svg +0 -67
  53. package/src/add-lux-components/files/assets/svg/svg2009.svg +0 -57457
  54. package/src/add-lux-components/files/src/polyfills.ts +0 -58
  55. package/src/add-lux-components/index.js.map +0 -1
  56. package/src/add-lux-components/index.ts +0 -293
  57. package/src/add-lux-components/index_spec.d.ts +0 -1
  58. package/src/add-lux-components/index_spec.js +0 -51
  59. package/src/add-lux-components/index_spec.js.map +0 -1
  60. package/src/add-lux-components/index_spec.ts +0 -55
  61. package/src/add-lux-components/schema.json +0 -23
  62. package/src/collection.json +0 -75
  63. package/src/theme/change-theme-to-authentic/index.js.map +0 -1
  64. package/src/theme/change-theme-to-authentic/index.ts +0 -131
  65. package/src/theme/change-theme-to-authentic/index_spec.d.ts +0 -1
  66. package/src/theme/change-theme-to-authentic/index_spec.js +0 -300
  67. package/src/theme/change-theme-to-authentic/index_spec.js.map +0 -1
  68. package/src/theme/change-theme-to-authentic/index_spec.ts +0 -321
  69. package/src/theme/change-theme-to-authentic/schema.json +0 -23
  70. package/src/theme/change-to-lux-icons/index.js.map +0 -1
  71. package/src/theme/change-to-lux-icons/index.ts +0 -392
  72. package/src/theme/change-to-lux-icons/index_spec.d.ts +0 -1
  73. package/src/theme/change-to-lux-icons/index_spec.js +0 -128
  74. package/src/theme/change-to-lux-icons/index_spec.js.map +0 -1
  75. package/src/theme/change-to-lux-icons/index_spec.ts +0 -130
  76. package/src/theme/change-to-lux-icons/schema.json +0 -23
  77. package/src/update-dependencies/index.js +0 -88
  78. package/src/update-dependencies/index.js.map +0 -1
  79. package/src/update-dependencies/index.ts +0 -86
  80. package/src/update-dependencies/schema.json +0 -23
  81. package/src/update-en-messages/index.js.map +0 -1
  82. package/src/update-en-messages/index.ts +0 -83
  83. package/src/update-en-messages/index_spec.d.ts +0 -1
  84. package/src/update-en-messages/index_spec.js +0 -174
  85. package/src/update-en-messages/index_spec.js.map +0 -1
  86. package/src/update-en-messages/index_spec.ts +0 -182
  87. package/src/update-en-messages/schema.json +0 -23
  88. package/src/updates/update140000/files/src/polyfills.ts +0 -70
  89. package/src/updates/update140000/index.d.ts +0 -14
  90. package/src/updates/update140000/index.js +0 -95
  91. package/src/updates/update140000/index.js.map +0 -1
  92. package/src/updates/update140000/index.ts +0 -110
  93. package/src/updates/update140000/index_spec.d.ts +0 -1
  94. package/src/updates/update140000/index_spec.js +0 -165
  95. package/src/updates/update140000/index_spec.js.map +0 -1
  96. package/src/updates/update140000/index_spec.ts +0 -171
  97. package/src/updates/update140000/schema.json +0 -23
  98. package/src/updates/update140100/index.d.ts +0 -5
  99. package/src/updates/update140100/index.js +0 -62
  100. package/src/updates/update140100/index.js.map +0 -1
  101. package/src/updates/update140100/index.ts +0 -60
  102. package/src/updates/update140100/index_spec.d.ts +0 -1
  103. package/src/updates/update140100/index_spec.js +0 -124
  104. package/src/updates/update140100/index_spec.js.map +0 -1
  105. package/src/updates/update140100/index_spec.ts +0 -137
  106. package/src/updates/update140100/schema.json +0 -23
  107. package/src/updates/update140200/index.d.ts +0 -8
  108. package/src/updates/update140200/index.js +0 -40
  109. package/src/updates/update140200/index.js.map +0 -1
  110. package/src/updates/update140200/index.ts +0 -38
  111. package/src/updates/update140200/index_spec.d.ts +0 -1
  112. package/src/updates/update140200/index_spec.js +0 -75
  113. package/src/updates/update140200/index_spec.js.map +0 -1
  114. package/src/updates/update140200/index_spec.ts +0 -81
  115. package/src/updates/update140200/schema.json +0 -23
  116. package/src/updates/update140300/index.d.ts +0 -10
  117. package/src/updates/update140300/index.js +0 -85
  118. package/src/updates/update140300/index.js.map +0 -1
  119. package/src/updates/update140300/index.ts +0 -86
  120. package/src/updates/update140300/index_spec.d.ts +0 -1
  121. package/src/updates/update140300/index_spec.js +0 -145
  122. package/src/updates/update140300/index_spec.js.map +0 -1
  123. package/src/updates/update140300/index_spec.ts +0 -177
  124. package/src/updates/update140300/schema.json +0 -23
  125. package/src/updates/update140400/index.d.ts +0 -2
  126. package/src/updates/update140400/index.js +0 -22
  127. package/src/updates/update140400/index.js.map +0 -1
  128. package/src/updates/update140400/index.ts +0 -18
  129. package/src/updates/update140400/index_spec.d.ts +0 -1
  130. package/src/updates/update140400/index_spec.js +0 -75
  131. package/src/updates/update140400/index_spec.js.map +0 -1
  132. package/src/updates/update140400/index_spec.ts +0 -81
  133. package/src/updates/update140400/schema.json +0 -23
  134. package/src/updates/update140500/index.d.ts +0 -2
  135. package/src/updates/update140500/index.js +0 -21
  136. package/src/updates/update140500/index.js.map +0 -1
  137. package/src/updates/update140500/index.ts +0 -17
  138. package/src/updates/update140500/index_spec.d.ts +0 -1
  139. package/src/updates/update140500/index_spec.js +0 -73
  140. package/src/updates/update140500/index_spec.js.map +0 -1
  141. package/src/updates/update140500/index_spec.ts +0 -78
  142. package/src/updates/update140500/schema.json +0 -23
  143. package/src/updates/update140600/index.d.ts +0 -2
  144. package/src/updates/update140600/index.js +0 -39
  145. package/src/updates/update140600/index.js.map +0 -1
  146. package/src/updates/update140600/index.ts +0 -35
  147. package/src/updates/update140600/index_spec.d.ts +0 -1
  148. package/src/updates/update140600/index_spec.js +0 -71
  149. package/src/updates/update140600/index_spec.js.map +0 -1
  150. package/src/updates/update140600/index_spec.ts +0 -75
  151. package/src/updates/update140600/schema.json +0 -23
  152. package/src/updates/update140700/index.d.ts +0 -2
  153. package/src/updates/update140700/index.js +0 -22
  154. package/src/updates/update140700/index.js.map +0 -1
  155. package/src/updates/update140700/index.ts +0 -18
  156. package/src/updates/update140700/index_spec.d.ts +0 -1
  157. package/src/updates/update140700/index_spec.js +0 -75
  158. package/src/updates/update140700/index_spec.js.map +0 -1
  159. package/src/updates/update140700/index_spec.ts +0 -79
  160. package/src/updates/update140700/schema.json +0 -23
  161. package/src/updates/update140800/index.d.ts +0 -2
  162. package/src/updates/update140800/index.js +0 -22
  163. package/src/updates/update140800/index.js.map +0 -1
  164. package/src/updates/update140800/index.ts +0 -18
  165. package/src/updates/update140800/index_spec.d.ts +0 -1
  166. package/src/updates/update140800/index_spec.js +0 -76
  167. package/src/updates/update140800/index_spec.js.map +0 -1
  168. package/src/updates/update140800/index_spec.ts +0 -82
  169. package/src/updates/update140800/schema.json +0 -23
  170. package/src/utility/dependencies.js.map +0 -1
  171. package/src/utility/dependencies.ts +0 -144
  172. package/src/utility/files.js.map +0 -1
  173. package/src/utility/files.ts +0 -368
  174. package/src/utility/html/hit.js.map +0 -1
  175. package/src/utility/html/hit.ts +0 -28
  176. package/src/utility/html/html-manipulator.js.map +0 -1
  177. package/src/utility/html/html-manipulator.ts +0 -156
  178. package/src/utility/html/html_spec.d.ts +0 -1
  179. package/src/utility/html/html_spec.js +0 -692
  180. package/src/utility/html/html_spec.js.map +0 -1
  181. package/src/utility/html/html_spec.ts +0 -751
  182. package/src/utility/html/manipulator-functions.js.map +0 -1
  183. package/src/utility/html/manipulator-functions.ts +0 -149
  184. package/src/utility/json.js.map +0 -1
  185. package/src/utility/json.ts +0 -288
  186. package/src/utility/json_spec.d.ts +0 -1
  187. package/src/utility/json_spec.js +0 -326
  188. package/src/utility/json_spec.js.map +0 -1
  189. package/src/utility/json_spec.ts +0 -446
  190. package/src/utility/logging.js.map +0 -1
  191. package/src/utility/logging.ts +0 -80
  192. package/src/utility/test.js.map +0 -1
  193. package/src/utility/test.ts +0 -24
  194. package/src/utility/typescript.js.map +0 -1
  195. package/src/utility/typescript.ts +0 -598
  196. package/src/utility/typescript_spec.d.ts +0 -1
  197. package/src/utility/typescript_spec.js +0 -1005
  198. package/src/utility/typescript_spec.js.map +0 -1
  199. package/src/utility/typescript_spec.ts +0 -1265
  200. package/src/utility/util.js.map +0 -1
  201. package/src/utility/util.ts +0 -145
  202. package/src/utility/validation.js.map +0 -1
  203. package/src/utility/validation.ts +0 -48
  204. package/tsconfig.json +0 -35
  205. /package/{src/add-lux-components → add-lux-components}/files/app/app-routing.module.ts +0 -0
  206. /package/{src/add-lux-components → add-lux-components}/files/app/app.module.ts +0 -0
  207. /package/{src/add-lux-components → add-lux-components}/files/environments/environment.prod.ts +0 -0
  208. /package/{src/add-lux-components → add-lux-components}/files/environments/environment.ts +0 -0
  209. /package/{src/add-lux-components → add-lux-components}/files/locale/messages.en.xlf +0 -0
  210. /package/{src/add-lux-components → add-lux-components}/files/locale/messages.xlf +0 -0
  211. /package/{src/add-lux-components → add-lux-components}/files/src/index.html +0 -0
  212. /package/{src/add-lux-components → add-lux-components}/index.d.ts +0 -0
  213. /package/{src/theme → theme}/change-theme-to-authentic/index.d.ts +0 -0
  214. /package/{src/theme → theme}/change-to-lux-icons/index.d.ts +0 -0
  215. /package/{src/update-en-messages → update-en-messages}/index.d.ts +0 -0
  216. /package/{src/utility → utility}/dependencies.d.ts +0 -0
  217. /package/{src/utility → utility}/files.d.ts +0 -0
  218. /package/{src/utility → utility}/html/hit.d.ts +0 -0
  219. /package/{src/utility → utility}/html/html-manipulator.d.ts +0 -0
  220. /package/{src/utility → utility}/html/manipulator-functions.d.ts +0 -0
  221. /package/{src/utility → utility}/logging.d.ts +0 -0
  222. /package/{src/utility → utility}/test.d.ts +0 -0
  223. /package/{src/utility → utility}/typescript.d.ts +0 -0
  224. /package/{src/utility → utility}/util.d.ts +0 -0
  225. /package/{src/utility → utility}/validation.d.ts +0 -0
@@ -1,137 +0,0 @@
1
- import { callRule, SchematicContext } from '@angular-devkit/schematics';
2
- import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
3
- import * as path from 'path';
4
- import { of as observableOf } from 'rxjs';
5
- import { getPackageJsonDependency } from '../../utility/dependencies';
6
- import { appOptions, workspaceOptions } from '../../utility/test';
7
- import { UtilConfig } from '../../utility/util';
8
- import { i18nDeButton, i18nEnButton, update140100 } from './index';
9
-
10
- const collectionPath = path.join(__dirname, '../../collection.json');
11
-
12
- describe('update140100', () => {
13
- let appTree: UnitTestTree;
14
- let runner: SchematicTestRunner;
15
- let context: SchematicContext;
16
-
17
- const testOptions: any = {};
18
-
19
- beforeEach(async () => {
20
- runner = new SchematicTestRunner('schematics', collectionPath);
21
-
22
- appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions).toPromise();
23
- appTree = await runner
24
- .runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree)
25
- .toPromise();
26
-
27
- UtilConfig.defaultWaitMS = 0;
28
-
29
- const collection = runner.engine.createCollection(collectionPath);
30
- const schematic = runner.engine.createSchematic('update-14.1.0', collection);
31
- context = runner.engine.createContext(schematic);
32
-
33
- testOptions.project = appOptions.name;
34
- testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
35
- testOptions.verbose = true;
36
- });
37
-
38
- describe('[Rule] update140100', () => {
39
- it('Sollte die Abhängigkeiten aktualisieren', (done) => {
40
- appTree.overwrite(
41
- '/package.json',
42
- `
43
- {
44
- "name": "Lorem ipsum",
45
- "version": "0.0.32",
46
- "scripts": {
47
- "build": "tsc -p tsconfig.json",
48
- "test": "npm run build && jasmine src/**/*_spec.js"
49
- },
50
- "dependencies": {
51
- "@angular/animations": "14.3.7",
52
- "@angular/cdk": "14.3.7",
53
- "@angular/common": "14.3.7",
54
- "@ihk-gfi/lux-components": "14.0.0",
55
- "@angular/compiler": "14.3.7"
56
- },
57
- "devDependencies": {
58
- "@angular-devkit/build-angular": "14.3.5",
59
- "@angular-eslint/builder": "14.2.1"
60
- }
61
- }
62
- `
63
- );
64
-
65
- callRule(update140100(testOptions), observableOf(appTree), context).subscribe(
66
- () => {
67
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.0.0');
68
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('14.1.0');
69
-
70
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.0.0');
71
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.1.0');
72
- done();
73
- },
74
- (reason) => expect(reason).toBeUndefined()
75
- );
76
- });
77
-
78
- it('Sollte die I18N-Dateien aktualisieren', (done) => {
79
- appTree.create('/src/locale/messages.xlf', i18nDe);
80
- appTree.create('/src/locale/messages.en.xlf', i18nEn);
81
-
82
- callRule(update140100(testOptions), observableOf(appTree), context).subscribe(
83
- () => {
84
- const deContent = appTree.read('/src/locale/messages.xlf')?.toString();
85
- expect(deContent).toContain(i18nDeButton);
86
-
87
- const enContent = appTree.read('/src/locale/messages.en.xlf')?.toString();
88
- expect(enContent).toContain(i18nEnButton);
89
- done();
90
- },
91
- (reason) => expect(reason).toBeUndefined()
92
- );
93
- });
94
-
95
- });
96
- });
97
-
98
- const i18nDe = `<?xml version="1.0" encoding="UTF-8" ?>
99
- <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
100
- <file source-language="en" datatype="plaintext" original="ng2.template">
101
- <body>
102
- <trans-unit id="luxc.file-list.upload.lbl" datatype="html">
103
- <source>Hochladen</source>
104
- <context-group purpose="location">
105
- <context context-type="sourcefile">src/app/modules/lux-form/lux-file/lux-file-list/lux-file-list.component.ts</context>
106
- <context context-type="linenumber">56</context>
107
- </context-group>
108
- <context-group purpose="location">
109
- <context context-type="sourcefile">src/app/modules/lux-form/lux-file/lux-file-upload/lux-file-upload.component.ts</context>
110
- <context context-type="linenumber">91</context>
111
- </context-group>
112
- </trans-unit>
113
- </body>
114
- </file>
115
- </xliff>
116
- `;
117
-
118
- const i18nEn = `<?xml version="1.0" encoding="UTF-8" ?>
119
- <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
120
- <file source-language="en" datatype="plaintext" original="ng2.template">
121
- <body>
122
- <trans-unit id="luxc.file-list.upload.lbl" datatype="html">
123
- <source>Hochladen</source>
124
- <target>Upload</target>
125
- <context-group purpose="location">
126
- <context context-type="sourcefile">src/app/modules/lux-form/lux-file/lux-file-list/lux-file-list.component.ts</context>
127
- <context context-type="linenumber">56</context>
128
- </context-group>
129
- <context-group purpose="location">
130
- <context context-type="sourcefile">src/app/modules/lux-form/lux-file/lux-file-upload/lux-file-upload.component.ts</context>
131
- <context context-type="linenumber">91</context>
132
- </context-group>
133
- </trans-unit>
134
- </body>
135
- </file>
136
- </xliff>
137
- `;
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxUpdate130200Schema",
4
- "title": "Aktualisiert das LUX-Componentsprojekt",
5
- "type": "object",
6
- "description": "Aktualisiert das LUX-Componentsprojekt",
7
- "properties": {
8
- "project": {
9
- "type": "string",
10
- "description": "Der Projektname",
11
- "$default": {
12
- "$source": "projectName"
13
- }
14
- },
15
- "verbose": {
16
- "type": "boolean",
17
- "description": "Generiert mehr Logausgaben",
18
- "default": false
19
- }
20
- },
21
- "required": [],
22
- "additionalProperties": false
23
- }
@@ -1,8 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare const logosAssetBlock: {
3
- glob: string;
4
- input: string;
5
- output: string;
6
- };
7
- export declare function update140200(options: any): Rule;
8
- export declare function addLogosAssets(options: any): Rule;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addLogosAssets = exports.update140200 = exports.logosAssetBlock = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const chalk = require("chalk");
6
- const index_1 = require("../../update-dependencies/index");
7
- const json_1 = require("../../utility/json");
8
- const util_1 = require("../../utility/util");
9
- exports.logosAssetBlock = {
10
- glob: '**/*',
11
- input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/logos/',
12
- output: './assets/logos'
13
- };
14
- function update140200(options) {
15
- return (_tree, _context) => {
16
- return (0, schematics_1.chain)([
17
- (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 14.2.0 aktualisiert...`),
18
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
19
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '14.2.0', false),
20
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '14.2.0', false),
21
- (0, index_1.updateDep)('@ihk-gfi/lux-components-icons-and-fonts', '1.3.0', false),
22
- addLogosAssets(options),
23
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 14.2.0 aktualisiert.`),
24
- (0, util_1.finish)(true, `${chalk.yellowBright('Fertig!')}`)
25
- ]);
26
- };
27
- }
28
- exports.update140200 = update140200;
29
- function addLogosAssets(options) {
30
- const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
31
- const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
32
- return (0, schematics_1.chain)([
33
- (0, util_1.messageInfoRule)(`Die Logos werden in den Asset-Abschnitten ergänzt...`),
34
- (0, json_1.updateJsonArray)('/angular.json', assetPath, exports.logosAssetBlock),
35
- (0, json_1.updateJsonArray)('/angular.json', testAssetPath, exports.logosAssetBlock),
36
- (0, util_1.messageSuccessRule)(`Die Logos wurden in den Asset-Abschnitten ergänzt.`)
37
- ]);
38
- }
39
- exports.addLogosAssets = addLogosAssets;
40
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,2DAA4D;AAC5D,6CAAqD;AACrD,6CAAiF;AAEpE,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,sEAAsE;IAC7E,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,SAAgB,YAAY,CAAC,OAAY;IACvC,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QACjD,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,sBAAe,EAAC,kEAAkE,CAAC;YACnF,IAAA,sBAAe,EAAC,4CAA4C,CAAC;YAC7D,IAAA,iBAAS,EAAC,yBAAyB,EAAE,QAAQ,EAAE,KAAK,CAAC;YACrD,IAAA,iBAAS,EAAC,+BAA+B,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC3D,IAAA,iBAAS,EAAC,yCAAyC,EAAE,OAAO,EAAE,KAAK,CAAC;YACpE,cAAc,CAAC,OAAO,CAAC;YACvB,IAAA,yBAAkB,EAAC,gEAAgE,CAAC;YACpF,IAAA,aAAM,EAAC,IAAI,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;SACjD,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAbD,oCAaC;AAED,SAAgB,cAAc,CAAC,OAAY;IACzC,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3F,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE9F,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,sBAAe,EAAC,sDAAsD,CAAC;QACvE,IAAA,sBAAe,EAAC,eAAe,EAAE,SAAS,EAAE,uBAAe,CAAC;QAC5D,IAAA,sBAAe,EAAC,eAAe,EAAE,aAAa,EAAE,uBAAe,CAAC;QAChE,IAAA,yBAAkB,EAAC,oDAAoD,CAAC;KACzE,CAAC,CAAC;AACL,CAAC;AAVD,wCAUC"}
@@ -1,38 +0,0 @@
1
- import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2
- import * as chalk from 'chalk';
3
- import { updateDep } from '../../update-dependencies/index';
4
- import { updateJsonArray } from '../../utility/json';
5
- import { finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
6
-
7
- export const logosAssetBlock = {
8
- glob: '**/*',
9
- input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/logos/',
10
- output: './assets/logos'
11
- };
12
-
13
- export function update140200(options: any): Rule {
14
- return (_tree: Tree, _context: SchematicContext) => {
15
- return chain([
16
- messageInfoRule(`Die LUX-Components werden auf die Version 14.2.0 aktualisiert...`),
17
- messageInfoRule(`Die Datei "package.json" wird angepasst...`),
18
- updateDep('@ihk-gfi/lux-components', '14.2.0', false),
19
- updateDep('@ihk-gfi/lux-components-theme', '14.2.0', false),
20
- updateDep('@ihk-gfi/lux-components-icons-and-fonts', '1.3.0', false),
21
- addLogosAssets(options),
22
- messageSuccessRule(`Die LUX-Components wurden auf die Version 14.2.0 aktualisiert.`),
23
- finish(true, `${chalk.yellowBright('Fertig!')}`)
24
- ]);
25
- };
26
- }
27
-
28
- export function addLogosAssets(options: any): Rule {
29
- const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
30
- const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
31
-
32
- return chain([
33
- messageInfoRule(`Die Logos werden in den Asset-Abschnitten ergänzt...`),
34
- updateJsonArray('/angular.json', assetPath, logosAssetBlock),
35
- updateJsonArray('/angular.json', testAssetPath, logosAssetBlock),
36
- messageSuccessRule(`Die Logos wurden in den Asset-Abschnitten ergänzt.`)
37
- ]);
38
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,75 +0,0 @@
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
- const schematics_1 = require("@angular-devkit/schematics");
13
- const testing_1 = require("@angular-devkit/schematics/testing");
14
- const path = require("path");
15
- const rxjs_1 = require("rxjs");
16
- const dependencies_1 = require("../../utility/dependencies");
17
- const test_1 = require("../../utility/test");
18
- const util_1 = require("../../utility/util");
19
- const index_1 = require("./index");
20
- const collectionPath = path.join(__dirname, '../../collection.json');
21
- describe('update140200', () => {
22
- let appTree;
23
- let runner;
24
- let context;
25
- const testOptions = {};
26
- beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
27
- runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
28
- appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'workspace', test_1.workspaceOptions).toPromise();
29
- appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree).toPromise();
30
- util_1.UtilConfig.defaultWaitMS = 0;
31
- const collection = runner.engine.createCollection(collectionPath);
32
- const schematic = runner.engine.createSchematic('update-14.2.0', collection);
33
- context = runner.engine.createContext(schematic);
34
- testOptions.project = test_1.appOptions.name;
35
- testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
36
- testOptions.verbose = true;
37
- }));
38
- describe('[Rule] update140200', () => {
39
- it('Sollte die Abhängigkeiten aktualisieren', (done) => {
40
- appTree.overwrite('/package.json', `
41
- {
42
- "name": "Lorem ipsum",
43
- "version": "0.0.32",
44
- "scripts": {
45
- "build": "tsc -p tsconfig.json",
46
- "test": "npm run build && jasmine src/**/*_spec.js"
47
- },
48
- "dependencies": {
49
- "@angular/animations": "14.3.7",
50
- "@angular/cdk": "14.3.7",
51
- "@angular/common": "14.3.7",
52
- "@ihk-gfi/lux-components": "14.1.0",
53
- "@ihk-gfi/lux-components-theme": "14.1.0",
54
- "@angular/compiler": "14.3.7",
55
- "@ihk-gfi/lux-components-icons-and-fonts": "1.1.0"
56
- },
57
- "devDependencies": {
58
- "@angular-devkit/build-angular": "14.3.5",
59
- "@angular-eslint/builder": "14.2.1"
60
- }
61
- }
62
- `);
63
- (0, schematics_1.callRule)((0, index_1.update140200)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
64
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.1.0');
65
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toEqual('14.2.0');
66
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.1.0');
67
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.2.0');
68
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.1.0');
69
- expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.3.0');
70
- done();
71
- }, (reason) => expect(reason).toBeUndefined());
72
- });
73
- });
74
- });
75
- //# sourceMappingURL=index_spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,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CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,81 +0,0 @@
1
- import { callRule, SchematicContext } from '@angular-devkit/schematics';
2
- import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
3
- import * as path from 'path';
4
- import { of as observableOf } from 'rxjs';
5
- import { getPackageJsonDependency } from '../../utility/dependencies';
6
- import { appOptions, workspaceOptions } from '../../utility/test';
7
- import { UtilConfig } from '../../utility/util';
8
- import { update140200 } from './index';
9
-
10
- const collectionPath = path.join(__dirname, '../../collection.json');
11
-
12
- describe('update140200', () => {
13
- let appTree: UnitTestTree;
14
- let runner: SchematicTestRunner;
15
- let context: SchematicContext;
16
-
17
- const testOptions: any = {};
18
-
19
- beforeEach(async () => {
20
- runner = new SchematicTestRunner('schematics', collectionPath);
21
-
22
- appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions).toPromise();
23
- appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree).toPromise();
24
-
25
- UtilConfig.defaultWaitMS = 0;
26
-
27
- const collection = runner.engine.createCollection(collectionPath);
28
- const schematic = runner.engine.createSchematic('update-14.2.0', collection);
29
- context = runner.engine.createContext(schematic);
30
-
31
- testOptions.project = appOptions.name;
32
- testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
33
- testOptions.verbose = true;
34
- });
35
-
36
- describe('[Rule] update140200', () => {
37
- it('Sollte die Abhängigkeiten aktualisieren', (done) => {
38
- appTree.overwrite(
39
- '/package.json',
40
- `
41
- {
42
- "name": "Lorem ipsum",
43
- "version": "0.0.32",
44
- "scripts": {
45
- "build": "tsc -p tsconfig.json",
46
- "test": "npm run build && jasmine src/**/*_spec.js"
47
- },
48
- "dependencies": {
49
- "@angular/animations": "14.3.7",
50
- "@angular/cdk": "14.3.7",
51
- "@angular/common": "14.3.7",
52
- "@ihk-gfi/lux-components": "14.1.0",
53
- "@ihk-gfi/lux-components-theme": "14.1.0",
54
- "@angular/compiler": "14.3.7",
55
- "@ihk-gfi/lux-components-icons-and-fonts": "1.1.0"
56
- },
57
- "devDependencies": {
58
- "@angular-devkit/build-angular": "14.3.5",
59
- "@angular-eslint/builder": "14.2.1"
60
- }
61
- }
62
- `
63
- );
64
-
65
- callRule(update140200(testOptions), observableOf(appTree), context).subscribe(
66
- () => {
67
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.1.0');
68
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('14.2.0');
69
-
70
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.1.0');
71
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.2.0');
72
-
73
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.1.0');
74
- expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.3.0');
75
- done();
76
- },
77
- (reason) => expect(reason).toBeUndefined()
78
- );
79
- });
80
- });
81
- });
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxUpdate130200Schema",
4
- "title": "Aktualisiert das LUX-Componentsprojekt",
5
- "type": "object",
6
- "description": "Aktualisiert das LUX-Componentsprojekt",
7
- "properties": {
8
- "project": {
9
- "type": "string",
10
- "description": "Der Projektname",
11
- "$default": {
12
- "$source": "projectName"
13
- }
14
- },
15
- "verbose": {
16
- "type": "boolean",
17
- "description": "Generiert mehr Logausgaben",
18
- "default": false
19
- }
20
- },
21
- "required": [],
22
- "additionalProperties": false
23
- }
@@ -1,10 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare const stylesScss: string;
3
- export declare const fontAssetBlock: {
4
- glob: string;
5
- input: string;
6
- output: string;
7
- };
8
- export declare function update140300(options: any): Rule;
9
- export declare function updateStylesScss(options: any): Rule;
10
- export declare function updateAngularJson(options: any): Rule;
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateAngularJson = exports.updateStylesScss = exports.update140300 = exports.fontAssetBlock = exports.stylesScss = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const chalk = require("chalk");
6
- const index_1 = require("../../update-dependencies/index");
7
- const json_1 = require("../../utility/json");
8
- const logging_1 = require("../../utility/logging");
9
- const util_1 = require("../../utility/util");
10
- const comment = `/* You can add global styles to this file, and also import other style files */`;
11
- const fontImport = `@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';`;
12
- const body = `
13
- $basepath: '/';
14
- @include web-fonts($basepath);
15
- `;
16
- exports.stylesScss = `${comment}
17
- ${fontImport}
18
-
19
- ${body}`;
20
- exports.fontAssetBlock = {
21
- glob: '**/*',
22
- input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/fonts/',
23
- output: './assets/fonts'
24
- };
25
- function update140300(options) {
26
- return (_tree, _context) => {
27
- return (0, schematics_1.chain)([
28
- (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 14.3.0 aktualisiert...`),
29
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
30
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '14.3.0', false),
31
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '14.4.0', false),
32
- (0, index_1.updateDep)('@ihk-gfi/lux-components-icons-and-fonts', '1.4.0', false),
33
- updateAngularJson(options),
34
- updateStylesScss(options),
35
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 14.3.0 aktualisiert.`),
36
- (0, util_1.finish)(true, `${chalk.yellowBright('Fertig!')}`)
37
- ]);
38
- };
39
- }
40
- exports.update140300 = update140300;
41
- function updateStylesScss(options) {
42
- return (0, schematics_1.chain)([
43
- (0, util_1.messageInfoRule)(`Die Fonts werden in der Datei "styles.scss" ergänzt...`),
44
- (tree, _context) => {
45
- var _a;
46
- const filePath = ((_a = options.path) !== null && _a !== void 0 ? _a : '.') + '/src/styles.scss';
47
- if (!tree.exists(filePath)) {
48
- throw Error(`Die Datei ${filePath} konnte nicht gefunden werden.`);
49
- }
50
- const lines = tree.read(filePath).toString().split('\n');
51
- let resultLines = [];
52
- if (lines.length > 0) {
53
- if (lines[0].trim().startsWith('/*') && lines[0].endsWith('*/')) {
54
- resultLines = [lines[0], fontImport, ...lines.slice(1, lines.length - 1), body];
55
- }
56
- else if (lines[0].trim() === '') {
57
- resultLines = [fontImport, ...lines.slice(1, lines.length - 1), body];
58
- }
59
- else {
60
- resultLines = [fontImport, ...lines, body];
61
- }
62
- tree.overwrite(filePath, resultLines.join('\n'));
63
- }
64
- else {
65
- tree.overwrite(filePath, exports.stylesScss);
66
- }
67
- (0, logging_1.logInfo)(fontImport);
68
- (0, logging_1.logInfo)(body.replace(/\r?\n/gm, '\n '));
69
- },
70
- (0, util_1.messageSuccessRule)(`Die Fonts wurden in der Datei "styles.scss" ergänzt.`)
71
- ]);
72
- }
73
- exports.updateStylesScss = updateStylesScss;
74
- function updateAngularJson(options) {
75
- const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
76
- const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
77
- return (0, schematics_1.chain)([
78
- (0, util_1.messageInfoRule)(`Die Fonts werden in den Asset-Abschnitten ergänzt...`),
79
- (0, json_1.updateJsonArray)('/angular.json', assetPath, exports.fontAssetBlock),
80
- (0, json_1.updateJsonArray)('/angular.json', testAssetPath, exports.fontAssetBlock),
81
- (0, util_1.messageSuccessRule)(`Die Fonts wurden in den Asset-Abschnitten ergänzt.`)
82
- ]);
83
- }
84
- exports.updateAngularJson = updateAngularJson;
85
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,2DAA4D;AAC5D,6CAAqD;AACrD,mDAAgD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C,CAAC,CAAC;QACpD,CAAC;QACD,IAAA,yBAAkB,EAAC,sDAAsD,CAAC;KAC3E,CAAC,CAAC;AACL,CAAC;AAhCD,4CAgCC;AAED,SAAgB,iBAAiB,CAAC,OAAY;IAC5C,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3F,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE9F,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,sBAAe,EAAC,sDAAsD,CAAC;QACvE,IAAA,sBAAe,EAAC,eAAe,EAAE,SAAS,EAAE,sBAAc,CAAC;QAC3D,IAAA,sBAAe,EAAC,eAAe,EAAE,aAAa,EAAE,sBAAc,CAAC;QAC/D,IAAA,yBAAkB,EAAC,oDAAoD,CAAC;KACzE,CAAC,CAAC;AACL,CAAC;AAVD,8CAUC"}
@@ -1,86 +0,0 @@
1
- import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2
- import * as chalk from 'chalk';
3
- import { updateDep } from '../../update-dependencies/index';
4
- import { updateJsonArray } from '../../utility/json';
5
- import { logInfo } from '../../utility/logging';
6
- import { finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
7
-
8
- const comment = `/* You can add global styles to this file, and also import other style files */`;
9
- const fontImport = `@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';`;
10
- const body = `
11
- $basepath: '/';
12
- @include web-fonts($basepath);
13
- `;
14
-
15
- export const stylesScss = `${comment}
16
- ${fontImport}
17
-
18
- ${body}`;
19
-
20
- export const fontAssetBlock = {
21
- glob: '**/*',
22
- input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/fonts/',
23
- output: './assets/fonts'
24
- };
25
-
26
- export function update140300(options: any): Rule {
27
- return (_tree: Tree, _context: SchematicContext) => {
28
- return chain([
29
- messageInfoRule(`Die LUX-Components werden auf die Version 14.3.0 aktualisiert...`),
30
- messageInfoRule(`Die Datei "package.json" wird angepasst...`),
31
- updateDep('@ihk-gfi/lux-components', '14.3.0', false),
32
- updateDep('@ihk-gfi/lux-components-theme', '14.4.0', false),
33
- updateDep('@ihk-gfi/lux-components-icons-and-fonts', '1.4.0', false),
34
- updateAngularJson(options),
35
- updateStylesScss(options),
36
- messageSuccessRule(`Die LUX-Components wurden auf die Version 14.3.0 aktualisiert.`),
37
- finish(true, `${chalk.yellowBright('Fertig!')}`)
38
- ]);
39
- };
40
- }
41
-
42
- export function updateStylesScss(options: any): Rule {
43
- return chain([
44
- messageInfoRule(`Die Fonts werden in der Datei "styles.scss" ergänzt...`),
45
- (tree: Tree, _context: SchematicContext) => {
46
- const filePath = (options.path ?? '.') + '/src/styles.scss';
47
-
48
- if (!tree.exists(filePath)) {
49
- throw Error(`Die Datei ${filePath} konnte nicht gefunden werden.`);
50
- }
51
-
52
- const lines = tree.read(filePath)!.toString().split('\n');
53
-
54
- let resultLines = [];
55
- if (lines.length > 0) {
56
- if (lines[0].trim().startsWith('/*') && lines[0].endsWith('*/')) {
57
- resultLines = [lines[0], fontImport, ...lines.slice(1, lines.length - 1), body];
58
- } else if (lines[0].trim() === '') {
59
- resultLines = [fontImport, ...lines.slice(1, lines.length - 1), body];
60
- } else {
61
- resultLines = [fontImport, ...lines, body];
62
- }
63
-
64
- tree.overwrite(filePath, resultLines.join('\n'));
65
- } else {
66
- tree.overwrite(filePath, stylesScss);
67
- }
68
-
69
- logInfo(fontImport);
70
- logInfo(body.replace(/\r?\n/gm, '\n '));
71
- },
72
- messageSuccessRule(`Die Fonts wurden in der Datei "styles.scss" ergänzt.`)
73
- ]);
74
- }
75
-
76
- export function updateAngularJson(options: any): Rule {
77
- const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
78
- const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
79
-
80
- return chain([
81
- messageInfoRule(`Die Fonts werden in den Asset-Abschnitten ergänzt...`),
82
- updateJsonArray('/angular.json', assetPath, fontAssetBlock),
83
- updateJsonArray('/angular.json', testAssetPath, fontAssetBlock),
84
- messageSuccessRule(`Die Fonts wurden in den Asset-Abschnitten ergänzt.`)
85
- ]);
86
- }
@@ -1 +0,0 @@
1
- export {};