Skip to content

Commit

Permalink
updated to angular 9
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Feb 8, 2020
1 parent 5e0e141 commit 3d5ece6
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 45 deletions.
2 changes: 1 addition & 1 deletion lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-build-plus",
"version": "9.0.2",
"version": "9.0.6",
"description": "Extends the Angular CLI's build process!",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -28,14 +28,14 @@
"webpack-merge": "^4.2.1"
},
"peerDependencies": {
"@angular-devkit/build-angular": ">=0.800.0",
"@angular-devkit/build-angular": ">=0.900.0",
"rxjs": ">= 6.0.0"
},
"devDependencies": {
"@angular-devkit/architect": "~0.800.0",
"@angular-devkit/build-angular": "~0.800.0",
"@angular-devkit/core": "^8.0.0",
"@angular-devkit/schematics": "^8.0.0",
"@angular-devkit/architect": "~0.900.0",
"@angular-devkit/build-angular": "~0.900.0",
"@angular-devkit/core": "^9.0.0",
"@angular-devkit/schematics": "^9.0.0",
"@types/node": "^10.12.18",
"@types/webpack": "^4.4.22",
"@types/webpack-dev-server": "^3.1.1",
Expand Down
6 changes: 4 additions & 2 deletions lib/schematics/externals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function loadPackageJson(tree: Tree) {
function updateScripts(path: string, config: any, tree: Tree, _options: any, _context: SchematicContext) {
const project = getProject(tree, _options);

if (path) path += '/';

if (!config['scripts']) {
config.scripts = {};
}
Expand All @@ -121,12 +123,12 @@ function updateScripts(path: string, config: any, tree: Tree, _options: any, _co

// Ivy support
const postInstall: string = config.scripts['postinstall'] || '';
if (postInstall.startsWith('ngcc')) {
//if (postInstall.startsWith('ngcc')) {
config.scripts['postinstall:bak'] = postInstall;
config.scripts['postinstall'] = 'ngcc';

_context.addTask(new RunSchematicTask('npmRun', {script: 'postinstall'}));
}
//}

if (!_options.host) {
// external web components need single bundle
Expand Down
28 changes: 28 additions & 0 deletions lib/src/browser/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
"default": true
},

"budgets": {
"description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
"type": "array",
"items": {
"$ref": "#/definitions/budget"
},
"default": []
},

"main": {
"type": "string",
"description": "The name of the main entry-point file."
Expand Down Expand Up @@ -178,6 +187,24 @@
"type": "string",
"description": "How to handle missing translations for i18n."
},

"localize": {
"oneOf": [
{
"type": "boolean",
"description": "Translate all locales."
},
{
"type": "array",
"description": "List of locales ID's to translate.",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
}
}
]
},
"extractCss": {
"type": "boolean",
"description": "Extract css from global styles onto css files instead of js ones.",
Expand Down Expand Up @@ -398,6 +425,7 @@
"allScript",
"any",
"anyScript",
"anyComponentStyle",
"bundle",
"initial"
]
Expand Down
3 changes: 2 additions & 1 deletion lib/src/plus-dev-server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
"default": true
},



"verbose": {
"type": "boolean",
"description": "Adds more details to output logging.",
"default": false
},


"browserTarget": {
"type": "string",
"description": "Target to serve."
Expand Down
35 changes: 0 additions & 35 deletions sample/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1023,41 +1023,6 @@
}
}
},
"externals-demo-new": {
"root": "projects/externals-demo-new",
"sourceRoot": "projects/externals-demo-new/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/externals-demo-new/tsconfig.lib.json",
"project": "projects/externals-demo-new/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/externals-demo-new/src/test.ts",
"tsConfig": "projects/externals-demo-new/tsconfig.spec.json",
"karmaConfig": "projects/externals-demo-new/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/externals-demo-new/tsconfig.lib.json",
"projects/externals-demo-new/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"externals-demo-scripts": {
"root": "projects/externals-demo-scripts/",
"sourceRoot": "projects/externals-demo-scripts/src",
Expand Down

0 comments on commit 3d5ece6

Please sign in to comment.