Use Angular CLI instead of ngm for building
Some commands: npm run build - to build the library. Output is in dist/ng2-file-upload/. npm run test - to run tests. Coverage report is in coverage/ as before. npm run demo.serve - to build demo application and serve it through browsersync npm run start - to run demo application using `ng serve`. Requires the library to be built and linked first.
This commit is contained in:
committed by
Evgeny Arshinov
parent
6cb3f87e57
commit
7a342268bb
48
angular.json
48
angular.json
@@ -4,6 +4,20 @@
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"ng2-file-upload": {
|
||||
"root": ".",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "library",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"options": {
|
||||
"tsConfig": "src/tsconfig.json",
|
||||
"project": "src/ng-package.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ng2-file-upload-demo": {
|
||||
"root": "demo",
|
||||
"sourceRoot": "demo/src",
|
||||
"projectType": "application",
|
||||
@@ -44,38 +58,48 @@
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "ng2-file-upload:build"
|
||||
"browserTarget": "ng2-file-upload-demo:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ng2-file-upload:build:production"
|
||||
"browserTarget": "ng2-file-upload-demo:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
"ng2-file-upload-test": {
|
||||
"root": ".",
|
||||
"sourceRoot": "test",
|
||||
"projectType": "library",
|
||||
"architect": {
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "demo/src/../../scripts/test.ts",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"main": "test/test.ts",
|
||||
"karmaConfig": "test/karma.conf.js",
|
||||
"scripts": [],
|
||||
"styles": [],
|
||||
"tsConfig": "demo/src/tsconfig.json",
|
||||
"assets": [
|
||||
"demo/src/assets"
|
||||
]
|
||||
"tsConfig": "test/tsconfig.json"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [],
|
||||
"exclude": []
|
||||
"tsConfig": [
|
||||
"src/tsconfig.json",
|
||||
"demo/src/tsconfig.json",
|
||||
"test/tsconfig.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "ng2-file-upload",
|
||||
"defaultProject": "ng2-file-upload-demo",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "",
|
||||
|
||||
Reference in New Issue
Block a user