@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.
- package/README.md +2 -4
- package/package.json +14 -17
- package/src/add-lux-components/files/app/app.component.html +1 -1
- package/src/add-lux-components/files/app/app.component.ts +4 -1
- package/src/add-lux-components/files/locale/messages.en.xlf +489 -235
- package/src/add-lux-components/files/locale/messages.xlf +451 -218
- package/src/add-lux-components/files/scripts/.browserslistrc +10 -7
- package/src/add-lux-components/files/src/index.html +31 -0
- package/src/add-lux-components/index.js +151 -78
- package/src/add-lux-components/index.js.map +1 -1
- package/src/add-lux-components/index.ts +141 -66
- package/src/add-lux-components/index_spec.js +4 -4
- package/src/add-lux-components/index_spec.js.map +1 -1
- package/src/add-lux-components/index_spec.ts +1 -1
- package/src/add-lux-components/schema.json +1 -1
- package/src/collection.json +8 -88
- package/src/update-dependencies/index.d.ts +1 -1
- package/src/update-dependencies/index.js +82 -65
- package/src/update-dependencies/index.js.map +1 -1
- package/src/update-dependencies/index.ts +112 -95
- package/src/update-dependencies/schema.json +1 -1
- package/src/update-en-messages/index.d.ts +2 -0
- package/src/update-en-messages/index.js +75 -0
- package/src/update-en-messages/index.js.map +1 -0
- package/src/update-en-messages/index.ts +78 -0
- package/src/{update110100 → update-en-messages}/schema.json +3 -3
- package/src/updates/update130000/files/root/.browserslistrc +20 -0
- package/src/updates/update130000/index.d.ts +27 -0
- package/src/updates/update130000/index.js +296 -0
- package/src/updates/update130000/index.js.map +1 -0
- package/src/updates/update130000/index.ts +346 -0
- package/src/{migrate-to-eslint → updates/update130000}/index_spec.d.ts +0 -0
- package/src/updates/update130000/index_spec.js +574 -0
- package/src/updates/update130000/index_spec.js.map +1 -0
- package/src/updates/update130000/index_spec.ts +665 -0
- package/src/{update → updates/update130000}/schema.json +1 -1
- package/src/utility/dependencies.js +16 -14
- package/src/utility/dependencies.js.map +1 -1
- package/src/utility/dependencies.ts +6 -4
- package/src/utility/files.d.ts +5 -1
- package/src/utility/files.js +27 -16
- package/src/utility/files.js.map +1 -1
- package/src/utility/files.ts +16 -3
- package/src/utility/html.js +88 -25
- package/src/utility/html.js.map +1 -1
- package/src/utility/html.ts +105 -29
- package/src/{migrate-to-webcomponent/index_spec.d.ts → utility/html_spec.d.ts} +0 -0
- package/src/utility/html_spec.js +560 -0
- package/src/utility/html_spec.js.map +1 -0
- package/src/utility/html_spec.ts +575 -0
- package/src/utility/json.d.ts +46 -1
- package/src/utility/json.js +174 -4
- package/src/utility/json.js.map +1 -1
- package/src/utility/json.ts +198 -3
- package/src/{update/index_spec.d.ts → utility/json_spec.d.ts} +0 -0
- package/src/utility/json_spec.js +326 -0
- package/src/utility/json_spec.js.map +1 -0
- package/src/utility/json_spec.ts +376 -0
- package/src/utility/typescript.js +16 -16
- package/src/utility/typescript.js.map +1 -1
- package/src/utility/typescript_spec.js +36 -36
- package/src/utility/typescript_spec.js.map +1 -1
- package/src/utility/util.d.ts +2 -2
- package/src/utility/util.js +16 -14
- package/src/utility/util.js.map +1 -1
- package/src/utility/util.ts +7 -5
- package/src/utility/validation.js +11 -11
- package/src/utility/validation.js.map +1 -1
- package/src/migrate-to-eslint/files/.eslintrc.json +0 -68
- package/src/migrate-to-eslint/files/.prettierrc +0 -25
- package/src/migrate-to-eslint/index.d.ts +0 -6
- package/src/migrate-to-eslint/index.js +0 -149
- package/src/migrate-to-eslint/index.js.map +0 -1
- package/src/migrate-to-eslint/index.ts +0 -181
- package/src/migrate-to-eslint/index_spec.js +0 -129
- package/src/migrate-to-eslint/index_spec.js.map +0 -1
- package/src/migrate-to-eslint/index_spec.ts +0 -152
- package/src/migrate-to-eslint/schema.json +0 -23
- package/src/migrate-to-webcomponent/index.d.ts +0 -10
- package/src/migrate-to-webcomponent/index.js +0 -278
- package/src/migrate-to-webcomponent/index.js.map +0 -1
- package/src/migrate-to-webcomponent/index.ts +0 -331
- package/src/migrate-to-webcomponent/index_spec.js +0 -580
- package/src/migrate-to-webcomponent/index_spec.js.map +0 -1
- package/src/migrate-to-webcomponent/index_spec.ts +0 -703
- package/src/migrate-to-webcomponent/schema.json +0 -23
- package/src/update/files/locale/messages.en.xlf +0 -940
- package/src/update/files/locale/messages.xlf +0 -815
- package/src/update/files/scripts/move-de-files.js +0 -15
- package/src/update/index.d.ts +0 -23
- package/src/update/index.js +0 -635
- package/src/update/index.js.map +0 -1
- package/src/update/index.ts +0 -712
- package/src/update/index_spec.js +0 -984
- package/src/update/index_spec.js.map +0 -1
- package/src/update/index_spec.ts +0 -1139
- package/src/update110001/index.d.ts +0 -2
- package/src/update110001/index.js +0 -42
- package/src/update110001/index.js.map +0 -1
- package/src/update110001/index.ts +0 -40
- package/src/update110001/index_spec.d.ts +0 -1
- package/src/update110001/index_spec.js +0 -67
- package/src/update110001/index_spec.js.map +0 -1
- package/src/update110001/index_spec.ts +0 -72
- package/src/update110001/schema.json +0 -23
- package/src/update110100/index.d.ts +0 -2
- package/src/update110100/index.js +0 -27
- package/src/update110100/index.js.map +0 -1
- package/src/update110100/index.ts +0 -24
- package/src/update110100/index_spec.d.ts +0 -1
- package/src/update110100/index_spec.js +0 -69
- package/src/update110100/index_spec.js.map +0 -1
- package/src/update110100/index_spec.ts +0 -73
- package/src/update110101/index.d.ts +0 -2
- package/src/update110101/index.js +0 -24
- package/src/update110101/index.js.map +0 -1
- package/src/update110101/index.ts +0 -21
- package/src/update110101/index_spec.d.ts +0 -1
- package/src/update110101/index_spec.js +0 -65
- package/src/update110101/index_spec.js.map +0 -1
- package/src/update110101/index_spec.ts +0 -69
- package/src/update110101/schema.json +0 -23
- package/src/update110200/index.d.ts +0 -2
- package/src/update110200/index.js +0 -24
- package/src/update110200/index.js.map +0 -1
- package/src/update110200/index.ts +0 -21
- package/src/update110200/index_spec.d.ts +0 -1
- package/src/update110200/index_spec.js +0 -65
- package/src/update110200/index_spec.js.map +0 -1
- package/src/update110200/index_spec.ts +0 -69
- package/src/update110200/schema.json +0 -23
- package/src/update110300/index.d.ts +0 -2
- package/src/update110300/index.js +0 -133
- package/src/update110300/index.js.map +0 -1
- package/src/update110300/index.ts +0 -148
- package/src/update110300/index_spec.d.ts +0 -1
- package/src/update110300/index_spec.js +0 -121
- package/src/update110300/index_spec.js.map +0 -1
- package/src/update110300/index_spec.ts +0 -139
- package/src/update110300/schema.json +0 -23
- package/src/update110400/index.d.ts +0 -2
- package/src/update110400/index.js +0 -28
- package/src/update110400/index.js.map +0 -1
- package/src/update110400/index.ts +0 -28
- package/src/update110400/index_spec.d.ts +0 -1
- package/src/update110400/index_spec.js +0 -66
- package/src/update110400/index_spec.js.map +0 -1
- package/src/update110400/index_spec.ts +0 -70
- package/src/update110400/schema.json +0 -23
- package/src/update110500/index.d.ts +0 -2
- package/src/update110500/index.js +0 -28
- package/src/update110500/index.js.map +0 -1
- package/src/update110500/index.ts +0 -28
- package/src/update110500/index_spec.d.ts +0 -1
- package/src/update110500/index_spec.js +0 -66
- package/src/update110500/index_spec.js.map +0 -1
- package/src/update110500/index_spec.ts +0 -70
- package/src/update110500/schema.json +0 -23
- package/src/update110600/index.d.ts +0 -2
- package/src/update110600/index.js +0 -28
- package/src/update110600/index.js.map +0 -1
- package/src/update110600/index.ts +0 -28
- package/src/update110600/index_spec.d.ts +0 -1
- package/src/update110600/index_spec.js +0 -66
- package/src/update110600/index_spec.js.map +0 -1
- package/src/update110600/index_spec.ts +0 -70
- package/src/update110600/schema.json +0 -23
- package/src/update110700/index.d.ts +0 -2
- package/src/update110700/index.js +0 -45
- package/src/update110700/index.js.map +0 -1
- package/src/update110700/index.ts +0 -47
- package/src/update110700/index_spec.d.ts +0 -1
- package/src/update110700/index_spec.js +0 -108
- package/src/update110700/index_spec.js.map +0 -1
- package/src/update110700/index_spec.ts +0 -122
- package/src/update110700/schema.json +0 -23
- package/src/update110800/index.d.ts +0 -2
- package/src/update110800/index.js +0 -32
- package/src/update110800/index.js.map +0 -1
- package/src/update110800/index.ts +0 -33
- package/src/update110800/index_spec.d.ts +0 -1
- package/src/update110800/index_spec.js +0 -70
- package/src/update110800/index_spec.js.map +0 -1
- package/src/update110800/index_spec.ts +0 -75
- package/src/update110800/schema.json +0 -23
- package/src/update110900/index.d.ts +0 -4
- package/src/update110900/index.js +0 -111
- package/src/update110900/index.js.map +0 -1
- package/src/update110900/index.ts +0 -123
- package/src/update110900/index_spec.d.ts +0 -1
- package/src/update110900/index_spec.js +0 -311
- package/src/update110900/index_spec.js.map +0 -1
- package/src/update110900/index_spec.ts +0 -341
- package/src/update110900/schema.json +0 -23
- package/src/update111000/index.d.ts +0 -2
- package/src/update111000/index.js +0 -27
- package/src/update111000/index.js.map +0 -1
- package/src/update111000/index.ts +0 -27
- package/src/update111000/index_spec.d.ts +0 -1
- package/src/update111000/index_spec.js +0 -65
- package/src/update111000/index_spec.js.map +0 -1
- package/src/update111000/index_spec.ts +0 -70
- package/src/update111000/schema.json +0 -23
- package/src/update111100/index.d.ts +0 -2
- package/src/update111100/index.js +0 -389
- package/src/update111100/index.js.map +0 -1
- package/src/update111100/index.ts +0 -405
- package/src/update111100/index_spec.d.ts +0 -1
- package/src/update111100/index_spec.js +0 -66
- package/src/update111100/index_spec.js.map +0 -1
- package/src/update111100/index_spec.ts +0 -70
- package/src/update111100/schema.json +0 -23
- package/src/update111200/index.d.ts +0 -2
- package/src/update111200/index.js +0 -59
- package/src/update111200/index.js.map +0 -1
- package/src/update111200/index.ts +0 -75
- package/src/update111200/index_spec.d.ts +0 -1
- package/src/update111200/index_spec.js +0 -67
- package/src/update111200/index_spec.js.map +0 -1
- package/src/update111200/index_spec.ts +0 -71
- package/src/update111200/schema.json +0 -23
- package/src/update111300/index.d.ts +0 -2
- package/src/update111300/index.js +0 -27
- package/src/update111300/index.js.map +0 -1
- package/src/update111300/index.ts +0 -27
- package/src/update111300/index_spec.d.ts +0 -1
- package/src/update111300/index_spec.js +0 -65
- package/src/update111300/index_spec.js.map +0 -1
- package/src/update111300/index_spec.ts +0 -69
- package/src/update111300/schema.json +0 -23
|
@@ -1,122 +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, hasPackageJsonDependency, updateDependency } from '../utility/dependencies';
|
|
6
|
-
import { appOptions, workspaceOptions } from '../utility/test';
|
|
7
|
-
import { UtilConfig } from '../utility/util';
|
|
8
|
-
import { update110700 } from './index';
|
|
9
|
-
|
|
10
|
-
const collectionPath = path.join(__dirname, '../collection.json');
|
|
11
|
-
|
|
12
|
-
describe('update110700', () => {
|
|
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-11.7.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] update110700', () => {
|
|
39
|
-
it('Sollte die Abhängigkeiten mit ESLint 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
|
-
"@ihk-gfi/lux-components": "11.0.0",
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@angular-devkit/build-angular": "0.1102.14",
|
|
55
|
-
"@angular-eslint/builder": "4.0.0",
|
|
56
|
-
"@angular-eslint/eslint-plugin": "4.0.0",
|
|
57
|
-
"@angular-eslint/eslint-plugin-template": "4.0.0",
|
|
58
|
-
"@angular-eslint/schematics": "4.0.0",
|
|
59
|
-
"@angular-eslint/template-parser": "4.0.0",
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
callRule(update110700(testOptions), observableOf(appTree), context).subscribe(
|
|
66
|
-
() => {
|
|
67
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
|
|
68
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
|
|
69
|
-
expect(getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
|
|
70
|
-
expect(getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
|
|
71
|
-
expect(getPackageJsonDependency(appTree, '@angular-eslint/builder').version).toEqual('4.3.1');
|
|
72
|
-
expect(getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin').version).toEqual('4.3.1');
|
|
73
|
-
expect(getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template').version).toEqual('4.3.1');
|
|
74
|
-
expect(getPackageJsonDependency(appTree, '@angular-eslint/schematics').version).toEqual('4.3.1');
|
|
75
|
-
expect(getPackageJsonDependency(appTree, '@angular-eslint/template-parser').version).toEqual('4.3.1');
|
|
76
|
-
|
|
77
|
-
done();
|
|
78
|
-
},
|
|
79
|
-
(reason) => expect(reason).toBeUndefined()
|
|
80
|
-
);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('Sollte die Abhängigkeiten ohne ESLint aktualisieren', (done) => {
|
|
84
|
-
appTree.overwrite(
|
|
85
|
-
'/package.json',
|
|
86
|
-
`
|
|
87
|
-
{
|
|
88
|
-
"name": "Lorem ipsum",
|
|
89
|
-
"version": "0.0.32",
|
|
90
|
-
"scripts": {
|
|
91
|
-
"build": "tsc -p tsconfig.json",
|
|
92
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
93
|
-
},
|
|
94
|
-
"dependencies": {
|
|
95
|
-
"@ihk-gfi/lux-components": "11.0.0",
|
|
96
|
-
},
|
|
97
|
-
"devDependencies": {
|
|
98
|
-
"@angular-devkit/build-angular": "0.1102.14",
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
`
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
callRule(update110700(testOptions), observableOf(appTree), context).subscribe(
|
|
105
|
-
() => {
|
|
106
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
|
|
107
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
|
|
108
|
-
expect(getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
|
|
109
|
-
expect(getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
|
|
110
|
-
expect(hasPackageJsonDependency(appTree, '@angular-eslint/builder')).toBeUndefined();
|
|
111
|
-
expect(hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin')).toBeUndefined();
|
|
112
|
-
expect(hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template')).toBeUndefined();
|
|
113
|
-
expect(hasPackageJsonDependency(appTree, '@angular-eslint/schematics')).toBeUndefined();
|
|
114
|
-
expect(hasPackageJsonDependency(appTree, '@angular-eslint/template-parser')).toBeUndefined();
|
|
115
|
-
|
|
116
|
-
done();
|
|
117
|
-
},
|
|
118
|
-
(reason) => expect(reason).toBeUndefined()
|
|
119
|
-
);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"id": "luxUpdate110700Schema",
|
|
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,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update110800 = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const chalk = require("chalk");
|
|
6
|
-
const dependencies_1 = require("../utility/dependencies");
|
|
7
|
-
const util_1 = require("../utility/util");
|
|
8
|
-
function update110800(options) {
|
|
9
|
-
return (tree, context) => {
|
|
10
|
-
return schematics_1.chain([
|
|
11
|
-
util_1.messageInfoRule(`Die LUX-Components werden auf die Version 11.8.0 aktualisiert...`),
|
|
12
|
-
util_1.messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
13
|
-
updateDependencies(),
|
|
14
|
-
util_1.messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
|
|
15
|
-
util_1.messageSuccessRule(`Die LUX-Components wurden auf die Version 11.8.0 aktualisiert.`),
|
|
16
|
-
util_1.finish(`${chalk.yellowBright('Fertig!')}`)
|
|
17
|
-
]);
|
|
18
|
-
};
|
|
19
|
-
function updateDependencies() {
|
|
20
|
-
return (tree, _context) => {
|
|
21
|
-
dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components', '11.8.0');
|
|
22
|
-
dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.10.0');
|
|
23
|
-
dependencies_1.updateDependency(tree, 'marked', '4.0.10');
|
|
24
|
-
dependencies_1.updateDependency(tree, '@types/marked', '4.0.1');
|
|
25
|
-
dependencies_1.updateDependencyDev(tree, '@angular-devkit/build-angular', '0.1102.18');
|
|
26
|
-
dependencies_1.updateDependencyDev(tree, '@compodoc/compodoc', '1.1.18');
|
|
27
|
-
return tree;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.update110800 = update110800;
|
|
32
|
-
//# 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,0DAA0G;AAC1G,0CAA8E;AAE9E,SAAgB,YAAY,CAAC,OAAY;IACvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,OAAO,kBAAK,CAAC;YACX,sBAAe,CAAC,kEAAkE,CAAC;YAEnF,sBAAe,CAAC,4CAA4C,CAAC;YAC7D,kBAAkB,EAAE;YACpB,yBAAkB,CAAC,2CAA2C,CAAC;YAE/D,yBAAkB,CAAC,gEAAgE,CAAC;YACpF,aAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;SAC3C,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,kBAAkB;QACzB,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;YAChD,+BAAgB,CAAC,IAAI,EAAE,yBAAyB,EAAE,QAAQ,CAAC,CAAC;YAC5D,+BAAgB,CAAC,IAAI,EAAE,+BAA+B,EAAE,SAAS,CAAC,CAAC;YACnE,+BAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC3C,+BAAgB,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;YAEjD,kCAAmB,CAAC,IAAI,EAAE,+BAA+B,EAAE,WAAW,CAAC,CAAC;YACxE,kCAAmB,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,CAAC,CAAC;YAE1D,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;AACH,CAAC;AA3BD,oCA2BC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as chalk from 'chalk';
|
|
3
|
-
import { hasPackageJsonDependency, updateDependency, updateDependencyDev } from '../utility/dependencies';
|
|
4
|
-
import { finish, messageInfoRule, messageSuccessRule } from '../utility/util';
|
|
5
|
-
|
|
6
|
-
export function update110800(options: any): Rule {
|
|
7
|
-
return (tree: Tree, context: SchematicContext) => {
|
|
8
|
-
return chain([
|
|
9
|
-
messageInfoRule(`Die LUX-Components werden auf die Version 11.8.0 aktualisiert...`),
|
|
10
|
-
|
|
11
|
-
messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
12
|
-
updateDependencies(),
|
|
13
|
-
messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
|
|
14
|
-
|
|
15
|
-
messageSuccessRule(`Die LUX-Components wurden auf die Version 11.8.0 aktualisiert.`),
|
|
16
|
-
finish(`${chalk.yellowBright('Fertig!')}`)
|
|
17
|
-
]);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
function updateDependencies() {
|
|
21
|
-
return (tree: Tree, _context: SchematicContext) => {
|
|
22
|
-
updateDependency(tree, '@ihk-gfi/lux-components', '11.8.0');
|
|
23
|
-
updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.10.0');
|
|
24
|
-
updateDependency(tree, 'marked', '4.0.10');
|
|
25
|
-
updateDependency(tree, '@types/marked', '4.0.1');
|
|
26
|
-
|
|
27
|
-
updateDependencyDev(tree, '@angular-devkit/build-angular', '0.1102.18');
|
|
28
|
-
updateDependencyDev(tree, '@compodoc/compodoc', '1.1.18');
|
|
29
|
-
|
|
30
|
-
return tree;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +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('update110800', () => {
|
|
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
|
|
30
|
-
.runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree)
|
|
31
|
-
.toPromise();
|
|
32
|
-
util_1.UtilConfig.defaultWaitMS = 0;
|
|
33
|
-
const collection = runner.engine.createCollection(collectionPath);
|
|
34
|
-
const schematic = runner.engine.createSchematic('update-11.8.0', collection);
|
|
35
|
-
context = runner.engine.createContext(schematic);
|
|
36
|
-
testOptions.project = test_1.appOptions.name;
|
|
37
|
-
testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
|
|
38
|
-
testOptions.verbose = true;
|
|
39
|
-
}));
|
|
40
|
-
describe('[Rule] update110800', () => {
|
|
41
|
-
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
42
|
-
appTree.overwrite('/package.json', `
|
|
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
|
-
"@ihk-gfi/lux-components": "11.0.0",
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@angular-devkit/build-angular": "0.1102.14"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`);
|
|
58
|
-
schematics_1.callRule(index_1.update110800(testOptions), rxjs_1.of(appTree), context).subscribe(() => {
|
|
59
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.8.0');
|
|
60
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.10.0');
|
|
61
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.18');
|
|
62
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, 'marked').version).toEqual('4.0.10');
|
|
63
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@types/marked').version).toEqual('4.0.1');
|
|
64
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@compodoc/compodoc').version).toEqual('1.1.18');
|
|
65
|
-
done();
|
|
66
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=index_spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,0DAAmE;AACnE,0CAA+D;AAC/D,0CAA6C;AAC7C,mCAAuC;AAEvC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,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,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAE/D,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OAAO,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;gBACtG,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACxG,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAC9E,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACpF,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAE1F,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"}
|
|
@@ -1,75 +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 { update110800 } from './index';
|
|
9
|
-
|
|
10
|
-
const collectionPath = path.join(__dirname, '../collection.json');
|
|
11
|
-
|
|
12
|
-
describe('update110800', () => {
|
|
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-11.8.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] update110800', () => {
|
|
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
|
-
"@ihk-gfi/lux-components": "11.0.0",
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@angular-devkit/build-angular": "0.1102.14"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
callRule(update110800(testOptions), observableOf(appTree), context).subscribe(
|
|
61
|
-
() => {
|
|
62
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.8.0');
|
|
63
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.10.0');
|
|
64
|
-
expect(getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.18');
|
|
65
|
-
expect(getPackageJsonDependency(appTree, 'marked').version).toEqual('4.0.10');
|
|
66
|
-
expect(getPackageJsonDependency(appTree, '@types/marked').version).toEqual('4.0.1');
|
|
67
|
-
expect(getPackageJsonDependency(appTree, '@compodoc/compodoc').version).toEqual('1.1.18');
|
|
68
|
-
|
|
69
|
-
done();
|
|
70
|
-
},
|
|
71
|
-
(reason) => expect(reason).toBeUndefined()
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"id": "luxUpdate110800Schema",
|
|
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,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addIconAssets = exports.addIconsToIndexHtml = exports.update110900 = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const chalk = require("chalk");
|
|
6
|
-
const jsonc_parser_1 = require("jsonc-parser");
|
|
7
|
-
const dependencies_1 = require("../utility/dependencies");
|
|
8
|
-
const json_1 = require("../utility/json");
|
|
9
|
-
const logging_1 = require("../utility/logging");
|
|
10
|
-
const util_1 = require("../utility/util");
|
|
11
|
-
function update110900(options) {
|
|
12
|
-
return (tree, context) => {
|
|
13
|
-
const fontawesomeCss = {
|
|
14
|
-
glob: 'all.css',
|
|
15
|
-
input: './node_modules/@fortawesome/fontawesome-free/css',
|
|
16
|
-
output: './assets/icons/fontawesome/css'
|
|
17
|
-
};
|
|
18
|
-
const fontawesomeIcons = {
|
|
19
|
-
glob: '*(*.eot|*.ttf|*.woff|*.woff2)',
|
|
20
|
-
input: './node_modules/@fortawesome/fontawesome-free/webfonts',
|
|
21
|
-
output: './assets/icons/fontawesome/webfonts'
|
|
22
|
-
};
|
|
23
|
-
const materialCss = {
|
|
24
|
-
glob: 'material-design-icons.css',
|
|
25
|
-
input: './node_modules/material-design-icons-iconfont/dist',
|
|
26
|
-
output: './assets/icons/material-icons'
|
|
27
|
-
};
|
|
28
|
-
const materialIcons = {
|
|
29
|
-
glob: '*(*.eot|*.ttf|*.woff|*.woff2)',
|
|
30
|
-
input: './node_modules/material-design-icons-iconfont/dist/fonts',
|
|
31
|
-
output: './assets/icons/material-icons/fonts'
|
|
32
|
-
};
|
|
33
|
-
return schematics_1.chain([
|
|
34
|
-
util_1.messageInfoRule(`Die LUX-Components werden auf die Version 11.9.0 aktualisiert...`),
|
|
35
|
-
util_1.messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
36
|
-
updateDependencies(),
|
|
37
|
-
util_1.messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
|
|
38
|
-
util_1.messageInfoRule(`Die Datei "angular.json" wird angepasst...`),
|
|
39
|
-
addIconAssets(options, materialIcons),
|
|
40
|
-
addIconAssets(options, materialCss),
|
|
41
|
-
addIconAssets(options, fontawesomeIcons),
|
|
42
|
-
addIconAssets(options, fontawesomeCss),
|
|
43
|
-
util_1.messageSuccessRule(`Die Datei "angular.json" wurde angepasst.`),
|
|
44
|
-
util_1.messageInfoRule(`Die Datei "index.html" wird angepasst...`),
|
|
45
|
-
addIconsToIndexHtml(options),
|
|
46
|
-
util_1.messageSuccessRule(`Die Datei "index.html" wurde angepasst.`),
|
|
47
|
-
util_1.messageSuccessRule(`Die LUX-Components wurden auf die Version 11.9.0 aktualisiert.`),
|
|
48
|
-
util_1.finish(`${chalk.yellowBright('Fertig!')}`)
|
|
49
|
-
]);
|
|
50
|
-
};
|
|
51
|
-
function updateDependencies() {
|
|
52
|
-
return (tree, _context) => {
|
|
53
|
-
dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components', '11.9.0');
|
|
54
|
-
dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.11.0');
|
|
55
|
-
return tree;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.update110900 = update110900;
|
|
60
|
-
function addIconsToIndexHtml(options) {
|
|
61
|
-
return schematics_1.chain([
|
|
62
|
-
(tree, context) => {
|
|
63
|
-
const newValue = '<link rel="stylesheet" href="assets/icons/fontawesome/css/all.css">\n' +
|
|
64
|
-
'<link rel="stylesheet" href="assets/icons/material-icons/material-design-icons.css">\n' +
|
|
65
|
-
'<link rel="icon"';
|
|
66
|
-
const errorMessage = 'Die folgenden Einträge konnten NICHT automatisiert eingetragen werden. Diese müssen jetzt manuell im <head>-Tag nachgetragen werden: ' +
|
|
67
|
-
'\n' +
|
|
68
|
-
newValue.replace('<link rel="icon"', '');
|
|
69
|
-
const filePath = 'src/index.html';
|
|
70
|
-
if (tree.read(filePath)) {
|
|
71
|
-
const content = tree.read(filePath).toString();
|
|
72
|
-
const modifiedContent = content.replace('<link rel="icon"', newValue);
|
|
73
|
-
if (modifiedContent !== content) {
|
|
74
|
-
logging_1.logInfo('Folgender Einträge wurden ergänzt: ' + newValue);
|
|
75
|
-
tree.overwrite(filePath, modifiedContent);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
logging_1.logError(errorMessage);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
logging_1.logError(errorMessage);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
]);
|
|
86
|
-
}
|
|
87
|
-
exports.addIconsToIndexHtml = addIconsToIndexHtml;
|
|
88
|
-
function addIconAssets(options, value) {
|
|
89
|
-
return (tree, context) => {
|
|
90
|
-
const filePath = '/angular.json';
|
|
91
|
-
let contentAsNode = json_1.readJson(tree, filePath);
|
|
92
|
-
const buildAssetsNode = jsonc_parser_1.findNodeAtLocation(contentAsNode, [
|
|
93
|
-
'projects',
|
|
94
|
-
options.project,
|
|
95
|
-
'architect',
|
|
96
|
-
'build',
|
|
97
|
-
'options',
|
|
98
|
-
'assets'
|
|
99
|
-
]);
|
|
100
|
-
if (buildAssetsNode) {
|
|
101
|
-
const angularJson = json_1.readJsonAsString(tree, filePath);
|
|
102
|
-
const edits = jsonc_parser_1.modify(angularJson, ['projects', options.project, 'architect', 'build', 'options', 'assets', 0], value, { formattingOptions: json_1.jsonFormattingOptions, isArrayInsertion: true });
|
|
103
|
-
if (edits) {
|
|
104
|
-
tree.overwrite(filePath, jsonc_parser_1.applyEdits(angularJson, edits));
|
|
105
|
-
logging_1.logInfo('Folgender Eintrag wurden ergänzt: ' + JSON.stringify(value));
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
exports.addIconAssets = addIconAssets;
|
|
111
|
-
//# 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,+CAAsE;AACtE,0DAA2D;AAC3D,0CAAoF;AACpF,gDAAgE;AAChE,0CAA8E;AAE9E,SAAgB,YA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EjC,IAAI,aAAa,GAAG,eAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC7C,MAAM,eAAe,GAAG,iCAAkB,CAAC,aAAa,EAAE;YACxD,UAAU;YACV,OAAO,CAAC,OAAO;YACf,WAAW;YACX,OAAO;YACP,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,IAAI,eAAe,EAAE;YACnB,MAAM,WAAW,GAAG,uBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACrD,MAAM,KAAK,GAAG,qBAAM,CAClB,WAAW,EACX,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAC3E,KAAK,EACL,EAAE,iBAAiB,EAAE,4BAAqB,EAAE,gBAAgB,EAAE,IAAI,EAAE,CACrE,CAAC;YACF,IAAI,KAAK,EAAE;gBACT,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,yBAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;gBACzD,iBAAO,CAAC,oCAAoC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;aACvE;SACF;IACH,CAAC,CAAC;AACJ,CAAC;AA3BD,sCA2BC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as chalk from 'chalk';
|
|
3
|
-
import { applyEdits, findNodeAtLocation, modify } from 'jsonc-parser';
|
|
4
|
-
import { updateDependency } from '../utility/dependencies';
|
|
5
|
-
import { jsonFormattingOptions, readJson, readJsonAsString } from '../utility/json';
|
|
6
|
-
import { logError, logInfo, logWarn } from '../utility/logging';
|
|
7
|
-
import { finish, messageInfoRule, messageSuccessRule } from '../utility/util';
|
|
8
|
-
|
|
9
|
-
export function update110900(options: any): Rule {
|
|
10
|
-
return (tree: Tree, context: SchematicContext) => {
|
|
11
|
-
const fontawesomeCss = {
|
|
12
|
-
glob: 'all.css',
|
|
13
|
-
input: './node_modules/@fortawesome/fontawesome-free/css',
|
|
14
|
-
output: './assets/icons/fontawesome/css'
|
|
15
|
-
};
|
|
16
|
-
const fontawesomeIcons = {
|
|
17
|
-
glob: '*(*.eot|*.ttf|*.woff|*.woff2)',
|
|
18
|
-
input: './node_modules/@fortawesome/fontawesome-free/webfonts',
|
|
19
|
-
output: './assets/icons/fontawesome/webfonts'
|
|
20
|
-
};
|
|
21
|
-
const materialCss = {
|
|
22
|
-
glob: 'material-design-icons.css',
|
|
23
|
-
input: './node_modules/material-design-icons-iconfont/dist',
|
|
24
|
-
output: './assets/icons/material-icons'
|
|
25
|
-
};
|
|
26
|
-
const materialIcons = {
|
|
27
|
-
glob: '*(*.eot|*.ttf|*.woff|*.woff2)',
|
|
28
|
-
input: './node_modules/material-design-icons-iconfont/dist/fonts',
|
|
29
|
-
output: './assets/icons/material-icons/fonts'
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return chain([
|
|
33
|
-
messageInfoRule(`Die LUX-Components werden auf die Version 11.9.0 aktualisiert...`),
|
|
34
|
-
|
|
35
|
-
messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
36
|
-
updateDependencies(),
|
|
37
|
-
messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
|
|
38
|
-
|
|
39
|
-
messageInfoRule(`Die Datei "angular.json" wird angepasst...`),
|
|
40
|
-
addIconAssets(options, materialIcons),
|
|
41
|
-
addIconAssets(options, materialCss),
|
|
42
|
-
addIconAssets(options, fontawesomeIcons),
|
|
43
|
-
addIconAssets(options, fontawesomeCss),
|
|
44
|
-
messageSuccessRule(`Die Datei "angular.json" wurde angepasst.`),
|
|
45
|
-
|
|
46
|
-
messageInfoRule(`Die Datei "index.html" wird angepasst...`),
|
|
47
|
-
addIconsToIndexHtml(options),
|
|
48
|
-
messageSuccessRule(`Die Datei "index.html" wurde angepasst.`),
|
|
49
|
-
|
|
50
|
-
messageSuccessRule(`Die LUX-Components wurden auf die Version 11.9.0 aktualisiert.`),
|
|
51
|
-
finish(`${chalk.yellowBright('Fertig!')}`)
|
|
52
|
-
]);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
function updateDependencies() {
|
|
56
|
-
return (tree: Tree, _context: SchematicContext) => {
|
|
57
|
-
updateDependency(tree, '@ihk-gfi/lux-components', '11.9.0');
|
|
58
|
-
updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.11.0');
|
|
59
|
-
|
|
60
|
-
return tree;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function addIconsToIndexHtml(options: any): Rule {
|
|
66
|
-
return chain([
|
|
67
|
-
(tree: Tree, context: SchematicContext) => {
|
|
68
|
-
const newValue =
|
|
69
|
-
'<link rel="stylesheet" href="assets/icons/fontawesome/css/all.css">\n' +
|
|
70
|
-
'<link rel="stylesheet" href="assets/icons/material-icons/material-design-icons.css">\n' +
|
|
71
|
-
'<link rel="icon"';
|
|
72
|
-
|
|
73
|
-
const errorMessage =
|
|
74
|
-
'Die folgenden Einträge konnten NICHT automatisiert eingetragen werden. Diese müssen jetzt manuell im <head>-Tag nachgetragen werden: ' +
|
|
75
|
-
'\n' +
|
|
76
|
-
newValue.replace('<link rel="icon"', '');
|
|
77
|
-
|
|
78
|
-
const filePath = 'src/index.html';
|
|
79
|
-
if (tree.read(filePath)) {
|
|
80
|
-
const content = (tree.read(filePath) as Buffer).toString();
|
|
81
|
-
const modifiedContent = content.replace('<link rel="icon"', newValue);
|
|
82
|
-
|
|
83
|
-
if (modifiedContent !== content) {
|
|
84
|
-
logInfo('Folgender Einträge wurden ergänzt: ' + newValue);
|
|
85
|
-
tree.overwrite(filePath, modifiedContent);
|
|
86
|
-
} else {
|
|
87
|
-
logError(errorMessage);
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
logError(errorMessage);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export function addIconAssets(options: any, value: any): Rule {
|
|
97
|
-
return (tree: Tree, context: SchematicContext) => {
|
|
98
|
-
const filePath = '/angular.json';
|
|
99
|
-
|
|
100
|
-
let contentAsNode = readJson(tree, filePath);
|
|
101
|
-
const buildAssetsNode = findNodeAtLocation(contentAsNode, [
|
|
102
|
-
'projects',
|
|
103
|
-
options.project,
|
|
104
|
-
'architect',
|
|
105
|
-
'build',
|
|
106
|
-
'options',
|
|
107
|
-
'assets'
|
|
108
|
-
]);
|
|
109
|
-
if (buildAssetsNode) {
|
|
110
|
-
const angularJson = readJsonAsString(tree, filePath);
|
|
111
|
-
const edits = modify(
|
|
112
|
-
angularJson,
|
|
113
|
-
['projects', options.project, 'architect', 'build', 'options', 'assets', 0],
|
|
114
|
-
value,
|
|
115
|
-
{ formattingOptions: jsonFormattingOptions, isArrayInsertion: true }
|
|
116
|
-
);
|
|
117
|
-
if (edits) {
|
|
118
|
-
tree.overwrite(filePath, applyEdits(angularJson, edits));
|
|
119
|
-
logInfo('Folgender Eintrag wurden ergänzt: ' + JSON.stringify(value));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|