-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IAC-796 Upgrade VCD archetype to support Angular 15
Signed-off-by: Vladislav Ganev <[email protected]>
- Loading branch information
Showing
15 changed files
with
195 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,6 @@ Thumbs.db | |
|
||
# awesome-typescript-loader cache | ||
.awcache/ | ||
|
||
# angular files | ||
.angular |
75 changes: 75 additions & 0 deletions
75
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/angular.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"uiPlugin": { | ||
"projectType": "library", | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "lib", | ||
"architect": { | ||
"build": { | ||
"builder": "@vcd/plugin-builders:plugin-builder", | ||
"options": { | ||
"modulePath": "src/main/${projectName}.module.ts#${projectHeading}Module", | ||
"outputPath": "target/bundle", | ||
"index": "src/main/index.html", | ||
"main": "src/main/${projectName}.main.ts", | ||
"tsConfig": "tsconfig.json", | ||
"assets": [{ | ||
"glob": "**/*", | ||
"input": "./src/public", | ||
"output": "/" | ||
}], | ||
"optimization": false, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": false, | ||
"namedChunks": false, | ||
"aot": false, | ||
"extractLicenses": false, | ||
"vendorChunk": false, | ||
"buildOptimizer": false | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "uiPlugin:build", | ||
"proxyConfig": ".env/proxy.conf.runtime.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "uiPlugin:build:production" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"tsConfig": "tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"tsconfig.lib.json", | ||
"tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "uiPlugin", | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |
101 changes: 35 additions & 66 deletions
101
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,37 @@ | ||
{ | ||
"name": "${projectHeading}", | ||
"version": "1.0.0", | ||
"description": "", | ||
"scripts": { | ||
"clean": "rimraf target", | ||
"build": "webpack" | ||
}, | ||
"license": "VMware Confidential", | ||
"dependencies": { | ||
"@angular-devkit/core": "8.3.19", | ||
"@angular-devkit/schematics": "8.3.19", | ||
"@angular/animations": "8.2.8", | ||
"@angular/common": "8.2.8", | ||
"@angular/core": "8.2.8", | ||
"@angular/forms": "8.2.8", | ||
"@angular/http": "7.2.15", | ||
"@angular/platform-browser": "8.2.8", | ||
"@angular/platform-browser-dynamic": "8.2.8", | ||
"@angular/router": "8.2.8", | ||
"@clr/angular": "2.3.8", | ||
"@clr/icons": "2.3.8", | ||
"@clr/ui": "2.3.8", | ||
"@ngrx/core": "1.2.0", | ||
"@ngrx/effects": "6.0.1", | ||
"@ngrx/store": "6.0.1", | ||
"@vcd/bindings": "9.1.1", | ||
"@vcd/sdk": "0.11.0", | ||
"@webcomponents/custom-elements": "1.2.1", | ||
"core-js": "2.5.1", | ||
"es6-shim": "0.35.3", | ||
"mutationobserver-shim": "0.3.2", | ||
"reflect-metadata": "0.1.10", | ||
"reselect": "3.0.0", | ||
"rxjs": "6.5.3", | ||
"rxjs-compat": "6.5.3", | ||
"web-animations-js": "2.3.1", | ||
"zone.js": "0.10.2" | ||
}, | ||
"devDependencies": { | ||
"@types/jasmine": "2.5.47", | ||
"@types/node": "14.0.1", | ||
"angular2-template-loader": "0.6.2", | ||
"autoprefixer": "9.3.1", | ||
"awesome-typescript-loader": "5.2.1", | ||
"copy-webpack-plugin": "5.0.3", | ||
"css-loader": "1.0.0", | ||
"cssnano": "4.1.10", | ||
"exports-loader": "0.7.0", | ||
"fast-xml-parser": "3.16.0", | ||
"file-loader": "2.0.0", | ||
"fs-extra": "9.0.0", | ||
"happypack": "5.0.0", | ||
"node-sass": "4.14.1", | ||
"postcss": "7.0.5", | ||
"postcss-loader": "3.0.0", | ||
"postcss-url": "8.0.0", | ||
"raw-loader": "0.5.1", | ||
"rimraf": "2.6.1", | ||
"sass-loader": "7.1.0", | ||
"tslint": "4.5.1", | ||
"typescript": "3.9.2", | ||
"webpack": "4.22.0", | ||
"webpack-cli": "3.1.2", | ||
"webpack-sources": "1.4.3", | ||
"zip-webpack-plugin": "3.0.0" | ||
} | ||
"name": "${projectHeading}", | ||
"version": "1.0.0", | ||
"description": "", | ||
"scripts": { | ||
"clean": "rimraf target", | ||
"build": "ng build", | ||
"prebuild": "node scripts/build-process.ts prebuild", | ||
"postbuild": "node scripts/build-process.ts postbuild" | ||
}, | ||
"license": "VMware Confidential", | ||
"dependencies": { | ||
"@angular/animations": "15.2.0", | ||
"@angular/common": "15.2.0", | ||
"@angular/compiler": "15.2.0", | ||
"@angular/core": "15.2.0", | ||
"@angular/forms": "15.2.0", | ||
"@angular/platform-browser": "15.2.0", | ||
"@angular/platform-browser-dynamic": "15.2.0", | ||
"@angular/router": "15.2.0", | ||
"@cds/core": "6.3.1", | ||
"@clr/angular": "15.0.3", | ||
"@clr/ui": "15.0.3", | ||
"@vcd/bindings": "9.1.1", | ||
"@vcd/i18n": "12.0.0", | ||
"@vcd/plugin-builders": "15.0.1", | ||
"@vcd/sdk": "15.0.2", | ||
"rxjs": "7.8.0", | ||
"tslib": "2.3.0", | ||
"zone.js": "0.12.0" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "15.2.3", | ||
"fast-xml-parser": "4.3.2", | ||
"typescript": "4.9.4" | ||
} | ||
} |
48 changes: 0 additions & 48 deletions
48
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/postcss.config.js
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/scripts/build-process.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const fs = require("fs"); | ||
const { XMLParser } = require("fast-xml-parser"); | ||
|
||
const manifestFile = "src/public/manifest.json"; | ||
const cycle = process.argv[2]; | ||
if (cycle === "prebuild") { | ||
fs.copyFileSync(manifestFile, `${manifestFile}.temp`); | ||
const parser = new XMLParser(); | ||
const pomJson = parser.parse(fs.readFileSync("pom.xml").toString().replace(/\r|\n/g, "")); | ||
|
||
let manifestContent = fs.readFileSync(manifestFile).toString(); | ||
manifestContent = manifestContent.replace("VERSION_PLACEHOLDER", pomJson.project.version); | ||
manifestContent = manifestContent.replace( | ||
"NAME_PLACEHOLDER", | ||
`${pomJson.project.groupId}.${pomJson.project.artifactId}` | ||
); | ||
manifestContent = manifestContent.replace( | ||
"URN_PLACEHOLDER", | ||
`${pomJson.project.groupId}.${pomJson.project.artifactId}`.replace(/\./g, ":") | ||
); | ||
|
||
fs.writeFileSync(manifestFile, manifestContent); | ||
} else if (cycle === "postbuild") { | ||
fs.copyFileSync(`${manifestFile}.temp`, manifestFile); | ||
fs.rmSync(`${manifestFile}.temp`, { | ||
force: true | ||
}); | ||
} else { | ||
console.log("Unknown argument"); | ||
} |
1 change: 1 addition & 0 deletions
1
...archetypes/vcd-ng/src/main/resources/archetype-resources/src/main/__projectName__.main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from 'src/main/${projectName}.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
1 change: 0 additions & 1 deletion
1
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/src/main/index.ts
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
...hetypes/vcd-ng/src/main/resources/archetype-resources/src/main/services/sample.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
maven/archetypes/vcd-ng/src/main/resources/archetype-resources/src/public/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.