-
Notifications
You must be signed in to change notification settings - Fork 15
Angular Libraries
Mike Goodstadt edited this page May 29, 2019
·
5 revisions
ng generate library ngx-resizable --prefix=tk
ng generate component component-name --prefix tk --project ngx-resizable --export
ng build ngx-resizable
2 steps:
- Add relative paths to tsconfig.lib.json (see stackoverflow):
{
"extends": "../../tsconfig.json",
"compilerOptions": {
...
"baseUrl": "./",
"paths": {
"ngx-resizable": [
"../../dist/ngx-resizable"
],
"ngx-resizable/*": [
"../../dist/ngx-resizable/*"
]
}
...
}
}
- Add umdModuleIds to ng-package.json (see ng-packagr docs):
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/ngx-resizable",
"deleteDestPath": false,
"lib": {
"entryFile": "src/public_api.ts",
"umdModuleIds": {
"ngx-resizable": "NgxResizable"
}
}
}