remove ng-package and use angular command to build lib

Signed-off-by: Meina Zhou <meinaz@vmware.com>
This commit is contained in:
Meina Zhou 2018-09-06 14:41:50 +08:00 committed by Qian Deng
parent 20b4386256
commit 94f967e054
8 changed files with 822 additions and 833 deletions

View File

@ -114,7 +114,7 @@
"exclude": [
"**/node_modules/**"
],
"fix":true
"fix": true
}
}
}
@ -139,6 +139,45 @@
}
}
}
},
"lib": {
"root": "lib",
"sourceRoot": "lib/src",
"projectType": "library",
"prefix": "enl",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "lib/tsconfig.lib.json",
"project": "lib/ng-package.json"
},
"configurations": {
"production": {
"project": "lib/ng-package.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "lib/src/test.ts",
"tsConfig": "lib/tsconfig.spec.json",
"karmaConfig": "lib/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"lib/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "clarity-seed",

View File

@ -1,5 +1,7 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"$schema": "../node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist",
"deleteDestPath": false,
"lib": {
"entryFile": "index.ts",
"externals": {

View File

@ -0,0 +1,12 @@
{
"$schema": "../node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist",
"lib": {
"entryFile": "index.ts",
"externals": {
"@ngx-translate/core": "ngx-translate-core",
"@ngx-translate/core/index": "ngx-translate-core",
"ngx-markdown": "ngx-markdown"
}
}
}

View File

@ -1,33 +0,0 @@
{
"compileOnSave": false,
"compilerOptions": {
"rootDir": "../",
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es6",
"dom"
],
"mapRoot": "src",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"types": [
"jasmine",
"core-js",
"node"
]
},
"exclude": [
"node_modules",
"dist",
"test.ts"
]
}

View File

@ -0,0 +1,33 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2015"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

File diff suppressed because it is too large Load Diff

View File

@ -12,8 +12,10 @@
"e2e": "protractor",
"build": "ng build --aot",
"release": "ng build --aot --prod",
"build:lib": "ng-packagr -p ./lib/ng-package.json",
"link-lib": "cd lib/dist && npm link && cd ../../ && npm link @harbor/ui"
"build_lib": "ng build --prod lib",
"npm_pack": "cd lib/dist && npm pack",
"package": "npm run build_lib && npm run npm_pack",
"link-lib":"cd lib/dist && npm link && cd ../../ && npm link @harbor/ui"
},
"private": true,
"dependencies": {
@ -36,6 +38,7 @@
"core-js": "^2.5.4",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ng-packagr": "^4.1.1",
"ngx-clipboard": "^11.1.1",
"ngx-cookie": "^1.0.0",
"ngx-markdown": "^6.2.0",
@ -48,6 +51,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0",
"@angular-devkit/build-ng-packagr": "~0.7.0",
"@angular/cli": "^6.1.5",
"@angular/compiler-cli": "^6.1.4",
"@angular/language-service": "^6.0.3",
@ -68,13 +72,14 @@
"karma-jasmine-html-reporter": "^0.2.2",
"karma-mocha-reporter": "^2.2.4",
"karma-remap-istanbul": "^0.6.0",
"ng-packagr": "^3.0.3",
"protractor": "~5.3.0",
"rollup": "^0.41.6",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^1.0.1",
"ts-node": "~5.0.1",
"tsickle": ">=0.29.0",
"tslib": "^1.9.0",
"tslint": "~5.9.1",
"typescript": "^2.7.2",
"typings": "^1.5.0",

View File

@ -16,7 +16,15 @@
"typeRoots": [
"./node_modules/@types/"
],
"baseUrl": "./"
"baseUrl": "./",
"paths": {
"lib": [
"dist/lib"
],
"lib/*": [
"dist/lib/*"
]
}
},
"files": [
"src/app/app.module.ts",