From 4a3540abe454f573a22f85ab7fec06d2dc180333 Mon Sep 17 00:00:00 2001 From: xmlking Date: Mon, 7 Jan 2019 23:59:46 -0800 Subject: [PATCH] feat(core): lib modules published to NPM angulat 7.2.0 upgrade, published libs to npm --- PLAYBOOK.md | 2 +- angular.json | 380 +++++------------- .../admin-layout/admin-layout.component.ts | 1 + libs/app-confirm/README.md | 11 + libs/app-confirm/package.json | 4 +- libs/auth/src/lib/auth.state.ts | 1 + .../lib/components/login/login.component.ts | 1 + libs/breadcrumbs/README.md | 13 + libs/breadcrumbs/package.json | 5 +- libs/chat-box/README.md | 14 + libs/chat-box/ng-package.json | 5 +- libs/chat-box/package.json | 6 +- libs/chat-box/src/lib/chat-box.component.scss | 2 - .../lib/services/speech-to-text.service.ts | 1 + .../lib/services/text-to-speech.service.ts | 1 + libs/chat-box/src/lib/state/chat-box.store.ts | 2 + libs/clap/README.md | 11 + libs/clap/package.json | 4 +- libs/context-menu/README.md | 12 + libs/context-menu/ng-package.json | 5 +- libs/context-menu/package.json | 6 +- libs/core/src/lib/core.module.ts | 1 + libs/core/src/lib/services/feature.service.ts | 1 + .../lib/services/service-worker.service.ts | 1 + libs/core/src/lib/state/app.handler.ts | 1 + libs/core/src/lib/state/app.state.ts | 1 + libs/core/src/lib/state/preference.state.ts | 1 + .../dashboard-layout.component.ts | 1 + libs/draggable/README.md | 16 + libs/draggable/ng-package.json | 6 +- libs/draggable/package.json | 6 +- .../header/sticky-header.directive.ts | 1 + .../lib/containers/about/about.component.ts | 1 + .../containers/features/features.component.ts | 1 + libs/image-comparison/README.md | 10 + libs/image-comparison/package.json | 4 +- libs/json-diff/README.md | 12 + libs/json-diff/package.json | 4 +- libs/led/README.md | 12 + libs/led/ng-package.json | 5 +- libs/led/package.json | 4 +- libs/loading-overlay/README.md | 12 + libs/loading-overlay/package.json | 4 +- libs/navigator/src/lib/state/menu.state.ts | 1 + libs/ngx-utils/README.md | 11 + libs/ngx-utils/ng-package.json | 5 +- libs/notifications/README.md | 12 + libs/notifications/ng-package.json | 8 +- libs/notifications/package.json | 6 +- .../src/lib/notifications.state.ts | 1 + libs/scroll-to-top/README.md | 11 + libs/scroll-to-top/package.json | 4 +- .../src/lib/scroll-to-top.component.ts | 1 + libs/scrollbar/README.md | 12 + libs/scrollbar/ng-package.json | 6 +- libs/scrollbar/package.json | 7 +- libs/sidenav/src/lib/sidenav.component.ts | 1 + libs/socketio-plugin/README.md | 9 + libs/socketio-plugin/ng-package.json | 6 +- libs/socketio-plugin/package.json | 8 +- libs/svg-viewer/README.md | 12 + libs/svg-viewer/package.json | 4 +- libs/svg-viewer/src/lib/svg-viewer.service.ts | 1 + libs/theme-picker/README.md | 12 + libs/theme-picker/package.json | 6 +- libs/tree/README.md | 12 + libs/tree/package.json | 6 +- libs/utils/README.md | 12 + libs/utils/ng-package.json | 7 + libs/utils/package.json | 8 + libs/utils/tsconfig.json | 8 +- libs/utils/tsconfig.spec.json | 2 +- nx.json | 170 ++------ stories/howto.md | 27 ++ tsconfig.json | 41 +- 75 files changed, 531 insertions(+), 498 deletions(-) create mode 100644 libs/breadcrumbs/README.md create mode 100644 libs/draggable/README.md create mode 100644 libs/json-diff/README.md create mode 100644 libs/led/README.md create mode 100644 libs/loading-overlay/README.md create mode 100644 libs/notifications/README.md create mode 100644 libs/scroll-to-top/README.md create mode 100644 libs/scrollbar/README.md create mode 100644 libs/svg-viewer/README.md create mode 100644 libs/theme-picker/README.md create mode 100644 libs/tree/README.md create mode 100644 libs/utils/README.md create mode 100644 libs/utils/ng-package.json create mode 100644 libs/utils/package.json diff --git a/PLAYBOOK.md b/PLAYBOOK.md index 0875e16fb..e71f11f19 100644 --- a/PLAYBOOK.md +++ b/PLAYBOOK.md @@ -254,7 +254,7 @@ ng g lib grid --routing --lazy --prefix=ngx --parent-module=libs/dashb ng g lib animations --module false -tags=utils --unit-test-runner=jest -d ng g lib Tree --module false --publishable=true --tags=utils --unit-test-runner=jest -d -ng g lib utils --module false --tags=utils --unit-test-runner=jest -d +ng g lib utils --module false --publishable=true --tags=utils --unit-test-runner=jest -d # system wide models ng g lib models --module false --tags=utils --unit-test-runner=jest -d diff --git a/angular.json b/angular.json index dfdfa74bc..274b55ba5 100644 --- a/angular.json +++ b/angular.json @@ -29,9 +29,7 @@ "apps/webapp/src/silent-refresh.html" ], "stylePreprocessorOptions": { - "includePaths": [ - "apps/webapp/src/styles" - ] + "includePaths": ["apps/webapp/src/styles"] }, "styles": [ "apps/webapp/src/styles.scss", @@ -174,14 +172,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "apps/webapp/tsconfig.app.json", - "apps/webapp/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**", - "**/*.json" - ] + "tsConfig": ["apps/webapp/tsconfig.app.json", "apps/webapp/tsconfig.spec.json"], + "exclude": ["**/node_modules/**", "**/*.json"] } }, "test": { @@ -215,10 +207,7 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "apps/webapp-e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**", - "**/*.json" - ] + "exclude": ["**/node_modules/**", "**/*.json"] } } } @@ -236,9 +225,7 @@ "sourceMap": true, "main": "apps/api/src/main.ts", "tsConfig": "apps/api/tsconfig.app.json", - "assets": [ - "apps/api/src/assets" - ], + "assets": ["apps/api/src/assets"], "showCircularDependencies": false }, "configurations": { @@ -269,14 +256,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "apps/api/tsconfig.app.json", - "apps/api/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**", - "**/*.json" - ] + "tsConfig": ["apps/api/tsconfig.app.json", "apps/api/tsconfig.spec.json"], + "exclude": ["**/node_modules/**", "**/*.json"] } }, "test": { @@ -304,9 +285,7 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "apps/api-e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } } } @@ -347,13 +326,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "apps/backend/tsconfig.app.json", - "apps/backend/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["apps/backend/tsconfig.app.json", "apps/backend/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -374,13 +348,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/models/tsconfig.lib.json", - "libs/models/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/models/tsconfig.lib.json", "libs/models/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -402,13 +371,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/navigator/tsconfig.lib.json", - "libs/navigator/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/navigator/tsconfig.lib.json", "libs/navigator/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -437,13 +401,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/socketio-plugin/tsconfig.lib.json", - "libs/socketio-plugin/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/socketio-plugin/tsconfig.lib.json", "libs/socketio-plugin/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -472,13 +431,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/tree/tsconfig.lib.json", - "libs/tree/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/tree/tsconfig.lib.json", "libs/tree/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -500,14 +454,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/home/tsconfig.lib.json", - "libs/home/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**", - "**/*.json" - ] + "tsConfig": ["libs/home/tsconfig.lib.json", "libs/home/tsconfig.spec.json"], + "exclude": ["**/node_modules/**", "**/*.json"] } }, "test": { @@ -529,13 +477,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/dashboard/tsconfig.lib.json", - "libs/dashboard/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/dashboard/tsconfig.lib.json", "libs/dashboard/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -557,13 +500,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/not-found/tsconfig.lib.json", - "libs/not-found/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/not-found/tsconfig.lib.json", "libs/not-found/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -585,13 +523,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/experiments/tsconfig.lib.json", - "libs/experiments/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/experiments/tsconfig.lib.json", "libs/experiments/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -613,13 +546,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/widgets/tsconfig.lib.json", - "libs/widgets/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/widgets/tsconfig.lib.json", "libs/widgets/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -641,13 +569,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/material/tsconfig.lib.json", - "libs/material/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/material/tsconfig.lib.json", "libs/material/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -669,13 +592,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/animations/tsconfig.lib.json", - "libs/animations/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/animations/tsconfig.lib.json", "libs/animations/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -694,16 +612,18 @@ "projectType": "library", "prefix": "ngx", "architect": { + "build": { + "builder": "@angular-devkit/build-ng-packagr:build", + "options": { + "tsConfig": "libs/utils/tsconfig.lib.json", + "project": "libs/utils/ng-package.json" + } + }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/utils/tsconfig.lib.json", - "libs/utils/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/utils/tsconfig.lib.json", "libs/utils/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -711,7 +631,7 @@ "options": { "jestConfig": "libs/utils/jest.config.js", "tsConfig": "libs/utils/tsconfig.spec.json", - "setupFile": "libs/utils/src/test-setup.ts" + "setupFile": "libs/auth/src/test-setup.ts" } } } @@ -725,13 +645,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/auth/tsconfig.lib.json", - "libs/auth/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/auth/tsconfig.lib.json", "libs/auth/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -753,13 +668,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/shared/tsconfig.lib.json", - "libs/shared/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/shared/tsconfig.lib.json", "libs/shared/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -788,13 +698,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/app-confirm/tsconfig.lib.json", - "libs/app-confirm/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/app-confirm/tsconfig.lib.json", "libs/app-confirm/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -823,13 +728,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/draggable/tsconfig.lib.json", - "libs/draggable/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/draggable/tsconfig.lib.json", "libs/draggable/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -858,13 +758,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/breadcrumbs/tsconfig.lib.json", - "libs/breadcrumbs/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/breadcrumbs/tsconfig.lib.json", "libs/breadcrumbs/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -893,13 +788,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/scroll-to-top/tsconfig.lib.json", - "libs/scroll-to-top/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/scroll-to-top/tsconfig.lib.json", "libs/scroll-to-top/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -928,13 +818,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/scrollbar/tsconfig.lib.json", - "libs/scrollbar/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/scrollbar/tsconfig.lib.json", "libs/scrollbar/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -963,13 +848,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/context-menu/tsconfig.lib.json", - "libs/context-menu/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/context-menu/tsconfig.lib.json", "libs/context-menu/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -998,13 +878,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/theme-picker/tsconfig.lib.json", - "libs/theme-picker/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/theme-picker/tsconfig.lib.json", "libs/theme-picker/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1026,13 +901,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/quickpanel/tsconfig.lib.json", - "libs/quickpanel/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/quickpanel/tsconfig.lib.json", "libs/quickpanel/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1061,13 +931,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/svg-viewer/tsconfig.lib.json", - "libs/svg-viewer/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/svg-viewer/tsconfig.lib.json", "libs/svg-viewer/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1096,13 +961,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/led/tsconfig.lib.json", - "libs/led/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/led/tsconfig.lib.json", "libs/led/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1131,13 +991,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/chat-box/tsconfig.lib.json", - "libs/chat-box/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/chat-box/tsconfig.lib.json", "libs/chat-box/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1166,13 +1021,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/json-diff/tsconfig.lib.json", - "libs/json-diff/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/json-diff/tsconfig.lib.json", "libs/json-diff/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1194,13 +1044,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/toolbar/tsconfig.lib.json", - "libs/toolbar/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/toolbar/tsconfig.lib.json", "libs/toolbar/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1222,13 +1067,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/sidenav/tsconfig.lib.json", - "libs/sidenav/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/sidenav/tsconfig.lib.json", "libs/sidenav/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1257,13 +1097,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/loading-overlay/tsconfig.lib.json", - "libs/loading-overlay/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/loading-overlay/tsconfig.lib.json", "libs/loading-overlay/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1285,13 +1120,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/grid/tsconfig.lib.json", - "libs/grid/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/grid/tsconfig.lib.json", "libs/grid/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1320,13 +1150,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/notifications/tsconfig.lib.json", - "libs/notifications/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/notifications/tsconfig.lib.json", "libs/notifications/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1348,13 +1173,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/core/tsconfig.lib.json", - "libs/core/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/core/tsconfig.lib.json", "libs/core/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1383,13 +1203,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/clap/tsconfig.lib.json", - "libs/clap/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/clap/tsconfig.lib.json", "libs/clap/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1418,13 +1233,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/image-comparison/tsconfig.lib.json", - "libs/image-comparison/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/image-comparison/tsconfig.lib.json", "libs/image-comparison/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1453,13 +1263,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/ngx-utils/tsconfig.lib.json", - "libs/ngx-utils/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/ngx-utils/tsconfig.lib.json", "libs/ngx-utils/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { @@ -1481,13 +1286,8 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "libs/admin/tsconfig.lib.json", - "libs/admin/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["libs/admin/tsconfig.lib.json", "libs/admin/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } }, "test": { diff --git a/libs/admin/src/lib/containers/admin-layout/admin-layout.component.ts b/libs/admin/src/lib/containers/admin-layout/admin-layout.component.ts index 513e37678..e40be7a49 100644 --- a/libs/admin/src/lib/containers/admin-layout/admin-layout.component.ts +++ b/libs/admin/src/lib/containers/admin-layout/admin-layout.component.ts @@ -6,6 +6,7 @@ import { Store } from '@ngxs/store'; import { WINDOW } from '@ngx-starter-kit/core'; import { NotificationsComponent } from '../notifications/notifications.component'; +/** @dynamic */ @Component({ selector: 'ngx-admin-layout', templateUrl: './admin-layout.component.html', diff --git a/libs/app-confirm/README.md b/libs/app-confirm/README.md index 19c078775..899828fd6 100644 --- a/libs/app-confirm/README.md +++ b/libs/app-confirm/README.md @@ -25,3 +25,14 @@ delete(item: Account) { } ``` + + +### Publish +```bash +# build +ng build app-confirm +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/app-confirm --access public +``` diff --git a/libs/app-confirm/package.json b/libs/app-confirm/package.json index b29221905..3c5999327 100644 --- a/libs/app-confirm/package.json +++ b/libs/app-confirm/package.json @@ -2,8 +2,8 @@ "name": "@ngx-starter-kit/app-confirm", "version": "0.0.1", "peerDependencies": { - "@angular/common": ">=7.1.0", - "@angular/core": ">=7.1.0", + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", "@angular/cdk": ">=7.2.0", "@angular/material": ">=7.2.0" } diff --git a/libs/auth/src/lib/auth.state.ts b/libs/auth/src/lib/auth.state.ts index 250a30744..352b2f300 100644 --- a/libs/auth/src/lib/auth.state.ts +++ b/libs/auth/src/lib/auth.state.ts @@ -22,6 +22,7 @@ export interface AuthStateModel { authMode: AuthMode; } +/** @dynamic */ @State({ name: 'auth', defaults: { diff --git a/libs/auth/src/lib/components/login/login.component.ts b/libs/auth/src/lib/components/login/login.component.ts index 8238b8219..ebc4177ab 100644 --- a/libs/auth/src/lib/components/login/login.component.ts +++ b/libs/auth/src/lib/components/login/login.component.ts @@ -8,6 +8,7 @@ import { OAuthService } from 'angular-oauth2-oidc'; import { Store } from '@ngxs/store'; import { ChangeAuthMode, AuthMode } from '../../auth.actions'; +/** @dynamic */ @Component({ selector: 'ngx-login', templateUrl: './login.component.html', diff --git a/libs/breadcrumbs/README.md b/libs/breadcrumbs/README.md new file mode 100644 index 000000000..31d6544f5 --- /dev/null +++ b/libs/breadcrumbs/README.md @@ -0,0 +1,13 @@ +# Breadcrumbs + + +### Publish +```bash +# build +ng build breadcrumbs +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/breadcrumbs --access public +``` + diff --git a/libs/breadcrumbs/package.json b/libs/breadcrumbs/package.json index d3519d254..87e922427 100644 --- a/libs/breadcrumbs/package.json +++ b/libs/breadcrumbs/package.json @@ -2,7 +2,8 @@ "name": "@ngx-starter-kit/breadcrumbs", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } + diff --git a/libs/chat-box/README.md b/libs/chat-box/README.md index 9f2f8c09a..1ff0f82bc 100644 --- a/libs/chat-box/README.md +++ b/libs/chat-box/README.md @@ -6,6 +6,20 @@ - multiple active conversations - save and retrieve active conversations +### Publish +```bash +# build deps first +ng build utils +ng build ngx-utils +# build +ng build chat-box +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/chat-box --access public +``` + + TODO multiple conversations inspired by https://www.weave.works/ diff --git a/libs/chat-box/ng-package.json b/libs/chat-box/ng-package.json index 930129c3c..04436e984 100644 --- a/libs/chat-box/ng-package.json +++ b/libs/chat-box/ng-package.json @@ -2,6 +2,9 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/chat-box", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "styleIncludePaths": [ + "../../apps/webapp/src/styles" + ] } } diff --git a/libs/chat-box/package.json b/libs/chat-box/package.json index 3c22b6536..7ca9dc2f1 100644 --- a/libs/chat-box/package.json +++ b/libs/chat-box/package.json @@ -2,7 +2,9 @@ "name": "@ngx-starter-kit/chat-box", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@angular/cdk": ">=7.2.0", + "@angular/material": ">=7.2.0" } } diff --git a/libs/chat-box/src/lib/chat-box.component.scss b/libs/chat-box/src/lib/chat-box.component.scss index f521f4b46..34e89b0a2 100644 --- a/libs/chat-box/src/lib/chat-box.component.scss +++ b/libs/chat-box/src/lib/chat-box.component.scss @@ -1,5 +1,3 @@ -//@import "animation-helper"; - //.flex-vert-center { // display: flex; // align-items: center; diff --git a/libs/chat-box/src/lib/services/speech-to-text.service.ts b/libs/chat-box/src/lib/services/speech-to-text.service.ts index 66a1ddc85..077c2f0bf 100644 --- a/libs/chat-box/src/lib/services/speech-to-text.service.ts +++ b/libs/chat-box/src/lib/services/speech-to-text.service.ts @@ -8,6 +8,7 @@ const SpeechRecognition = (window as any).oSpeechRecognition || (window as any).SpeechRecognition; +/** @dynamic */ @Injectable() export class SpeechToTextService { public canUseSpeechRecognition = false; diff --git a/libs/chat-box/src/lib/services/text-to-speech.service.ts b/libs/chat-box/src/lib/services/text-to-speech.service.ts index cf2824d2c..87dbf680e 100644 --- a/libs/chat-box/src/lib/services/text-to-speech.service.ts +++ b/libs/chat-box/src/lib/services/text-to-speech.service.ts @@ -2,6 +2,7 @@ import { Inject, Injectable } from '@angular/core'; import { SynthesisVoice } from '../state/chat-box.actions'; import { BrowserFeatureKey, FeatureService, WINDOW } from '@ngx-starter-kit/core'; +/** @dynamic */ @Injectable() export class TextToSpeechService { public canUseSpeechSynthesis = false; diff --git a/libs/chat-box/src/lib/state/chat-box.store.ts b/libs/chat-box/src/lib/state/chat-box.store.ts index 36c039b0a..bf0a1685a 100644 --- a/libs/chat-box/src/lib/state/chat-box.store.ts +++ b/libs/chat-box/src/lib/state/chat-box.store.ts @@ -30,6 +30,7 @@ import { SynthesisVoice, } from './chat-box.actions'; + export class ChatBoxStateModel { conversations: Conversation[]; activeConversationId: string | number; @@ -46,6 +47,7 @@ export class ChatBoxStateModel { loading: boolean; } +/** @dynamic */ @State({ name: 'chatbox', defaults: { diff --git a/libs/clap/README.md b/libs/clap/README.md index 4957e812f..49eab0747 100644 --- a/libs/clap/README.md +++ b/libs/clap/README.md @@ -11,3 +11,14 @@ Clap micro-interaction 2. Creating Reusable Animations in Angular - https://netbasal.com/creating-reusable-animations-in-angular-6a2350d6191a + + +### Publish +```bash +# build +ng build clap +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/clap --access public +``` diff --git a/libs/clap/package.json b/libs/clap/package.json index 3c323d93b..93a83884d 100644 --- a/libs/clap/package.json +++ b/libs/clap/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/clap", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/context-menu/README.md b/libs/context-menu/README.md index a00f7c9e5..dcf82ecdb 100644 --- a/libs/context-menu/README.md +++ b/libs/context-menu/README.md @@ -21,3 +21,15 @@ ```html
Right click me to see the menu
``` + + +### Publish +```bash +# build +ng build context-menu +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/context-menu --access public +``` + diff --git a/libs/context-menu/ng-package.json b/libs/context-menu/ng-package.json index bc29005ea..96b54ab24 100644 --- a/libs/context-menu/ng-package.json +++ b/libs/context-menu/ng-package.json @@ -2,6 +2,9 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/context-menu", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "umdModuleIds": { + "@ngx-starter-kit/ngx-utils": "@ngx-starter-kit/ngx-utils" + } } } diff --git a/libs/context-menu/package.json b/libs/context-menu/package.json index 954b951e3..eb4e1416c 100644 --- a/libs/context-menu/package.json +++ b/libs/context-menu/package.json @@ -2,7 +2,9 @@ "name": "@ngx-starter-kit/context-menu", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@angular/cdk": ">=7.2.0", + "@angular/material": ">=7.2.0" } } diff --git a/libs/core/src/lib/core.module.ts b/libs/core/src/lib/core.module.ts index f96548258..db8238d16 100644 --- a/libs/core/src/lib/core.module.ts +++ b/libs/core/src/lib/core.module.ts @@ -47,6 +47,7 @@ export function noop() { */ library.add(faTwitter, faGithub, faGoogle); +/** @dynamic */ @NgModule({ imports: [ CommonModule, diff --git a/libs/core/src/lib/services/feature.service.ts b/libs/core/src/lib/services/feature.service.ts index e52ce60db..c5b98c6b8 100644 --- a/libs/core/src/lib/services/feature.service.ts +++ b/libs/core/src/lib/services/feature.service.ts @@ -29,6 +29,7 @@ export class BrowserFeature { constructor(public key: string, public supported: boolean) {} } +/** @dynamic */ @Injectable({ providedIn: 'root', }) diff --git a/libs/core/src/lib/services/service-worker.service.ts b/libs/core/src/lib/services/service-worker.service.ts index 8a2a0ec7c..e39854d86 100644 --- a/libs/core/src/lib/services/service-worker.service.ts +++ b/libs/core/src/lib/services/service-worker.service.ts @@ -4,6 +4,7 @@ import { environment } from '@env/environment'; import { WINDOW } from './window.token'; import { MatSnackBar } from '@angular/material'; +/** @dynamic */ @Injectable({ providedIn: 'root', }) diff --git a/libs/core/src/lib/state/app.handler.ts b/libs/core/src/lib/state/app.handler.ts index 73cfe9c78..1e7803865 100644 --- a/libs/core/src/lib/state/app.handler.ts +++ b/libs/core/src/lib/state/app.handler.ts @@ -5,6 +5,7 @@ import { EventCategory, GoogleAnalyticsService } from '../services/google-analyt import { AppState, ChangeInstallStatus, ChangeOnlineStatus, IsOffline, IsOnline, SetInstallPrompt } from './app.state'; import { WINDOW } from '../services/window.token'; +/** @dynamic */ @Injectable({ providedIn: 'root', }) diff --git a/libs/core/src/lib/state/app.state.ts b/libs/core/src/lib/state/app.state.ts index d39ee3271..152af1c89 100644 --- a/libs/core/src/lib/state/app.state.ts +++ b/libs/core/src/lib/state/app.state.ts @@ -36,6 +36,7 @@ export interface AppStateModel { installed: boolean; } +/** @dynamic */ @State({ name: 'app', defaults: { diff --git a/libs/core/src/lib/state/preference.state.ts b/libs/core/src/lib/state/preference.state.ts index 2918b510a..a8614e3f5 100644 --- a/libs/core/src/lib/state/preference.state.ts +++ b/libs/core/src/lib/state/preference.state.ts @@ -78,6 +78,7 @@ export interface PreferenceStateModel { enableNotifications: boolean; } +/** @dynamic */ @State({ name: 'preference', defaults: { diff --git a/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.ts b/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.ts index e48263e31..bb3cbd541 100644 --- a/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.ts +++ b/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.ts @@ -12,6 +12,7 @@ import { map } from 'rxjs/operators'; import { WINDOW } from '@ngx-starter-kit/core'; import { untilDestroy } from '@ngx-starter-kit/ngx-utils'; +/** @dynamic */ @Component({ selector: 'ngx-dashboard-layout', templateUrl: './dashboard-layout.component.html', diff --git a/libs/draggable/README.md b/libs/draggable/README.md new file mode 100644 index 000000000..b2a77973b --- /dev/null +++ b/libs/draggable/README.md @@ -0,0 +1,16 @@ +# Draggable + + +### Publish +```bash +# build deps first +ng build utils +ng build ngx-utils +# build +ng build draggable +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/draggable --access public +``` + diff --git a/libs/draggable/ng-package.json b/libs/draggable/ng-package.json index cd00fedd7..9d8d650a0 100644 --- a/libs/draggable/ng-package.json +++ b/libs/draggable/ng-package.json @@ -2,6 +2,10 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/draggable", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "umdModuleIds": { + "@ngx-starter-kit/ngx-utils": "@ngx-starter-kit/ngx-utils", + "@ngx-starter-kit/utils": "@ngx-starter-kit/utils" + } } } diff --git a/libs/draggable/package.json b/libs/draggable/package.json index 2b79fda99..1fed8bb44 100644 --- a/libs/draggable/package.json +++ b/libs/draggable/package.json @@ -2,7 +2,9 @@ "name": "@ngx-starter-kit/draggable", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@angular/cdk": ">=7.2.0", + "@angular/material": ">=7.2.0" } } diff --git a/libs/home/src/lib/components/header/sticky-header.directive.ts b/libs/home/src/lib/components/header/sticky-header.directive.ts index b3802ef98..feec8e53c 100644 --- a/libs/home/src/lib/components/header/sticky-header.directive.ts +++ b/libs/home/src/lib/components/header/sticky-header.directive.ts @@ -11,6 +11,7 @@ enum Direction { Down = 'Down', } +/** @dynamic */ @Directive({ selector: '[stickyHeader]', }) diff --git a/libs/home/src/lib/containers/about/about.component.ts b/libs/home/src/lib/containers/about/about.component.ts index d138859c0..a72b42dd3 100644 --- a/libs/home/src/lib/containers/about/about.component.ts +++ b/libs/home/src/lib/containers/about/about.component.ts @@ -7,6 +7,7 @@ import { WINDOW } from '@ngx-starter-kit/core'; // import * as Trianglify from 'trianglify'; declare var Trianglify: any; +/** @dynamic */ @Component({ selector: 'ngx-about', templateUrl: './about.component.html', diff --git a/libs/home/src/lib/containers/features/features.component.ts b/libs/home/src/lib/containers/features/features.component.ts index 2dcc43a22..705bd9558 100644 --- a/libs/home/src/lib/containers/features/features.component.ts +++ b/libs/home/src/lib/containers/features/features.component.ts @@ -4,6 +4,7 @@ import { environment as env } from '@env/environment'; import { ROUTE_ANIMATIONS_ELEMENTS } from '@ngx-starter-kit/animations'; import { WINDOW } from '@ngx-starter-kit/core'; +/** @dynamic */ @Component({ selector: 'ngx-features', templateUrl: './features.component.html', diff --git a/libs/image-comparison/README.md b/libs/image-comparison/README.md index 135b08d5d..55fb96d0d 100644 --- a/libs/image-comparison/README.md +++ b/libs/image-comparison/README.md @@ -12,3 +12,13 @@ ### Credit - [ImageComparison](https://github.com/M-Ulyanov/ImageComparison) + +### Publish +```bash +# build +ng build image-comparison +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/image-comparison --access public +``` diff --git a/libs/image-comparison/package.json b/libs/image-comparison/package.json index f03f9bc34..92932d07e 100644 --- a/libs/image-comparison/package.json +++ b/libs/image-comparison/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/image-comparison", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/json-diff/README.md b/libs/json-diff/README.md new file mode 100644 index 000000000..76e84e2f8 --- /dev/null +++ b/libs/json-diff/README.md @@ -0,0 +1,12 @@ +# Json Diff + + +### Publish +```bash +# build +ng build json-diff +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/json-diff --access public +``` diff --git a/libs/json-diff/package.json b/libs/json-diff/package.json index 2936a78a3..38dd4e3ac 100644 --- a/libs/json-diff/package.json +++ b/libs/json-diff/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/json-diff", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/led/README.md b/libs/led/README.md new file mode 100644 index 000000000..1ff500521 --- /dev/null +++ b/libs/led/README.md @@ -0,0 +1,12 @@ +# Led + + +### Publish +```bash +# build +ng build led +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/led --access public +``` diff --git a/libs/led/ng-package.json b/libs/led/ng-package.json index d642c7bd1..b38228e82 100644 --- a/libs/led/ng-package.json +++ b/libs/led/ng-package.json @@ -2,6 +2,9 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/led", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "styleIncludePaths": [ + "../../apps/webapp/src/styles" + ] } } diff --git a/libs/led/package.json b/libs/led/package.json index 504ec80a0..90319f700 100644 --- a/libs/led/package.json +++ b/libs/led/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/led", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/loading-overlay/README.md b/libs/loading-overlay/README.md new file mode 100644 index 000000000..a2b3ef75d --- /dev/null +++ b/libs/loading-overlay/README.md @@ -0,0 +1,12 @@ +# loading-overlay + + +### Publish +```bash +# build +ng build loading-overlay +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/loading-overlay --access public +``` diff --git a/libs/loading-overlay/package.json b/libs/loading-overlay/package.json index f1b2b7478..e7181f478 100644 --- a/libs/loading-overlay/package.json +++ b/libs/loading-overlay/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/loading-overlay", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/navigator/src/lib/state/menu.state.ts b/libs/navigator/src/lib/state/menu.state.ts index 92c36f31c..c1607bc91 100644 --- a/libs/navigator/src/lib/state/menu.state.ts +++ b/libs/navigator/src/lib/state/menu.state.ts @@ -29,6 +29,7 @@ export interface MenuStateModel { iconMode: boolean; } +/** @dynamic */ @State({ name: 'menu', defaults: { diff --git a/libs/ngx-utils/README.md b/libs/ngx-utils/README.md index 23dd2eba1..ab51d937b 100644 --- a/libs/ngx-utils/README.md +++ b/libs/ngx-utils/README.md @@ -60,3 +60,14 @@ export class ViewportDemoComponent implements OnInit, OnDestroy { } } ``` + + +### Publish +```bash +# build +ng build ngx-utils +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/ngx-utils --access public +``` diff --git a/libs/ngx-utils/ng-package.json b/libs/ngx-utils/ng-package.json index 2099fb48d..190ec3629 100644 --- a/libs/ngx-utils/ng-package.json +++ b/libs/ngx-utils/ng-package.json @@ -2,6 +2,9 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/ngx-utils", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "umdModuleIds": { + "date-fns/esm": "date-fns/esm" + } } } diff --git a/libs/notifications/README.md b/libs/notifications/README.md new file mode 100644 index 000000000..1e161ea6f --- /dev/null +++ b/libs/notifications/README.md @@ -0,0 +1,12 @@ +# Notifications + + +### Publish +```bash +# build +ng build notifications +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/notifications --access public +``` diff --git a/libs/notifications/ng-package.json b/libs/notifications/ng-package.json index 66bca7ac9..2aa8c0ab9 100644 --- a/libs/notifications/ng-package.json +++ b/libs/notifications/ng-package.json @@ -2,6 +2,12 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/notifications", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "styleIncludePaths": [ + "../../apps/webapp/src/styles" + ], + "umdModuleIds": { + "date-fns/esm": "date-fns/esm" + } } } diff --git a/libs/notifications/package.json b/libs/notifications/package.json index 97fe78926..cb88bae48 100644 --- a/libs/notifications/package.json +++ b/libs/notifications/package.json @@ -2,7 +2,9 @@ "name": "@ngx-starter-kit/notifications", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@angular/cdk": ">=7.2.0", + "@angular/material": ">=7.2.0" } } diff --git a/libs/notifications/src/lib/notifications.state.ts b/libs/notifications/src/lib/notifications.state.ts index d1e7e7588..53e34c222 100644 --- a/libs/notifications/src/lib/notifications.state.ts +++ b/libs/notifications/src/lib/notifications.state.ts @@ -11,6 +11,7 @@ import { MarkAllAsRead, } from './notifications.actions'; +/** @dynamic */ @State({ name: 'notifications', defaults: [], diff --git a/libs/scroll-to-top/README.md b/libs/scroll-to-top/README.md new file mode 100644 index 000000000..32ed680aa --- /dev/null +++ b/libs/scroll-to-top/README.md @@ -0,0 +1,11 @@ +# Scroll-to-Top + +### Publish +```bash +# build +ng build scroll-to-top +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/scroll-to-top --access public +``` diff --git a/libs/scroll-to-top/package.json b/libs/scroll-to-top/package.json index 3415fce78..a0c7187a4 100644 --- a/libs/scroll-to-top/package.json +++ b/libs/scroll-to-top/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/scroll-to-top", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/scroll-to-top/src/lib/scroll-to-top.component.ts b/libs/scroll-to-top/src/lib/scroll-to-top.component.ts index f342f47b8..305b503ac 100644 --- a/libs/scroll-to-top/src/lib/scroll-to-top.component.ts +++ b/libs/scroll-to-top/src/lib/scroll-to-top.component.ts @@ -12,6 +12,7 @@ enum ShowStatus { hide = 'hide', } +/** @dynamic */ @Component({ selector: 'scroll-to-top', templateUrl: './scroll-to-top.component.html', diff --git a/libs/scrollbar/README.md b/libs/scrollbar/README.md new file mode 100644 index 000000000..1deab76f4 --- /dev/null +++ b/libs/scrollbar/README.md @@ -0,0 +1,12 @@ +# Scrollbar + + +### Publish +```bash +# build +ng build scrollbar +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/scrollbar --access public +``` diff --git a/libs/scrollbar/ng-package.json b/libs/scrollbar/ng-package.json index ad0987f24..fec84406c 100644 --- a/libs/scrollbar/ng-package.json +++ b/libs/scrollbar/ng-package.json @@ -1,7 +1,11 @@ { "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/scrollbar", + "whitelistedNonPeerDependencies": ["smooth-scrollbar"], "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "umdModuleIds": { + "smooth-scrollbar": "smooth-scrollbar" + } } } diff --git a/libs/scrollbar/package.json b/libs/scrollbar/package.json index 45dcb245d..a5b118b8d 100644 --- a/libs/scrollbar/package.json +++ b/libs/scrollbar/package.json @@ -2,7 +2,10 @@ "name": "@ngx-starter-kit/scrollbar", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" + }, + "dependencies": { + "smooth-scrollbar": ">=8.3.1" } } diff --git a/libs/sidenav/src/lib/sidenav.component.ts b/libs/sidenav/src/lib/sidenav.component.ts index 427b565aa..dd84ee5d7 100644 --- a/libs/sidenav/src/lib/sidenav.component.ts +++ b/libs/sidenav/src/lib/sidenav.component.ts @@ -17,6 +17,7 @@ import { untilDestroy } from '@ngx-starter-kit/ngx-utils'; import { WINDOW } from '@ngx-starter-kit/core'; // import { sidenavAnimation } from '@ngx-starter-kit/animations'; +/** @dynamic */ @Component({ selector: 'ngx-sidenav', templateUrl: './sidenav.component.html', diff --git a/libs/socketio-plugin/README.md b/libs/socketio-plugin/README.md index 07ebff2b1..405d8f0b8 100644 --- a/libs/socketio-plugin/README.md +++ b/libs/socketio-plugin/README.md @@ -1,2 +1,11 @@ # socketio-plugin +### Publish +```bash +# build +ng build socketio-plugin +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/socketio-plugin --access public +``` diff --git a/libs/socketio-plugin/ng-package.json b/libs/socketio-plugin/ng-package.json index b2e0f4e91..ca7c5bb45 100644 --- a/libs/socketio-plugin/ng-package.json +++ b/libs/socketio-plugin/ng-package.json @@ -2,6 +2,10 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/libs/socketio-plugin", "lib": { - "entryFile": "src/index.ts" + "entryFile": "src/index.ts", + "umdModuleIds": { + "socket.io-client": "io", + "@ngxs/store": "ngxs-store" + } } } diff --git a/libs/socketio-plugin/package.json b/libs/socketio-plugin/package.json index 794f05943..c3c563f26 100644 --- a/libs/socketio-plugin/package.json +++ b/libs/socketio-plugin/package.json @@ -2,9 +2,9 @@ "name": "@ngx-starter-kit/socketio-plugin", "version": "0.0.2", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0", - "@ngxs/store": "^3.3.0", - "socket.io-client": "^2.2.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@ngxs/store": ">=3.3.0", + "socket.io-client": ">=2.2.0" } } diff --git a/libs/svg-viewer/README.md b/libs/svg-viewer/README.md new file mode 100644 index 000000000..f54f2e1d8 --- /dev/null +++ b/libs/svg-viewer/README.md @@ -0,0 +1,12 @@ +# Svg-Viewer + + +### Publish +```bash +# build +ng build svg-viewer +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/svg-viewer --access public +``` diff --git a/libs/svg-viewer/package.json b/libs/svg-viewer/package.json index af2a03102..42d6382dd 100644 --- a/libs/svg-viewer/package.json +++ b/libs/svg-viewer/package.json @@ -2,7 +2,7 @@ "name": "@ngx-starter-kit/svg-viewer", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" } } diff --git a/libs/svg-viewer/src/lib/svg-viewer.service.ts b/libs/svg-viewer/src/lib/svg-viewer.service.ts index 2a34f6f85..9f40b1f6b 100644 --- a/libs/svg-viewer/src/lib/svg-viewer.service.ts +++ b/libs/svg-viewer/src/lib/svg-viewer.service.ts @@ -4,6 +4,7 @@ import { of as observableOf, Observable } from 'rxjs'; import { catchError, finalize, map, share } from 'rxjs/operators'; import { SvgViewerConfig } from './svg-viewer.config'; +/** @dynamic */ @Injectable() export class SvgViewerService { private static _cache: Map; diff --git a/libs/theme-picker/README.md b/libs/theme-picker/README.md new file mode 100644 index 000000000..a1317c647 --- /dev/null +++ b/libs/theme-picker/README.md @@ -0,0 +1,12 @@ +# Theme-Picker + + +### Publish +```bash +# build +ng build theme-picker +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/theme-picker --access public +``` diff --git a/libs/theme-picker/package.json b/libs/theme-picker/package.json index fb43929b6..3002e96aa 100644 --- a/libs/theme-picker/package.json +++ b/libs/theme-picker/package.json @@ -2,7 +2,9 @@ "name": "@ngx-starter-kit/theme-picker", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0", + "@angular/cdk": ">=7.2.0", + "@angular/material": ">=7.2.0" } } diff --git a/libs/tree/README.md b/libs/tree/README.md new file mode 100644 index 000000000..290401fdc --- /dev/null +++ b/libs/tree/README.md @@ -0,0 +1,12 @@ +# Tree + + +### Publish +```bash +# build +ng build tree +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/tree --access public +``` diff --git a/libs/tree/package.json b/libs/tree/package.json index e3095a48b..60920e6c6 100644 --- a/libs/tree/package.json +++ b/libs/tree/package.json @@ -1,8 +1,4 @@ { "name": "@ngx-starter-kit/tree", - "version": "0.0.1", - "peerDependencies": { - "@angular/common": "^7.1.0", - "@angular/core": "^7.1.0" - } + "version": "0.0.1" } diff --git a/libs/utils/README.md b/libs/utils/README.md new file mode 100644 index 000000000..9f5912596 --- /dev/null +++ b/libs/utils/README.md @@ -0,0 +1,12 @@ +# Utils + + +### Publish +```bash +# build +ng build utils +# replace your npm key +export NPM_TOKEN="00000000-0000-0000-0000-000000000000" +# publish +npm publish dist/libs/utils --access public +``` diff --git a/libs/utils/ng-package.json b/libs/utils/ng-package.json new file mode 100644 index 000000000..ff275ec9f --- /dev/null +++ b/libs/utils/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/libs/utils", + "lib": { + "entryFile": "src/index.ts" + } +} diff --git a/libs/utils/package.json b/libs/utils/package.json new file mode 100644 index 000000000..efc973e5e --- /dev/null +++ b/libs/utils/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ngx-starter-kit/utils", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^7.2.0-rc.0", + "@angular/core": "^7.2.0-rc.0" + } +} diff --git a/libs/utils/tsconfig.json b/libs/utils/tsconfig.json index 2bae24ff8..e5decd5e2 100644 --- a/libs/utils/tsconfig.json +++ b/libs/utils/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "types": [ - "jest", - "node" - ] - } + "types": ["node", "jest"] + }, + "include": ["**/*.ts"] } diff --git a/libs/utils/tsconfig.spec.json b/libs/utils/tsconfig.spec.json index 4ffa4841c..3be4a060f 100644 --- a/libs/utils/tsconfig.spec.json +++ b/libs/utils/tsconfig.spec.json @@ -5,6 +5,6 @@ "module": "commonjs", "types": ["jest", "node"] }, - "files": ["src/test-setup.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/nx.json b/nx.json index 6e040d629..077327560 100644 --- a/nx.json +++ b/nx.json @@ -9,216 +9,126 @@ }, "projects": { "webapp": { - "tags": [ - "app-module" - ] + "tags": ["app-module"] }, "webapp-e2e": { "tags": [], - "implicitDependencies": [ - "webapp" - ] + "implicitDependencies": ["webapp"] }, "api": { - "tags": [ - "api-module" - ] + "tags": ["api-module"] }, "api-e2e": { "tags": [], - "implicitDependencies": [ - "api" - ] + "implicitDependencies": ["api"] }, "backend": { - "tags": [ - "api-module" - ] + "tags": ["api-module"] }, "navigator": { - "tags": [ - "private-module", - "core-module" - ] + "tags": ["private-module", "core-module"] }, "socketio-plugin": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "tree": { - "tags": [ - "utils" - ] + "tags": ["utils"] }, "home": { - "tags": [ - "layout", - "entry-module" - ] + "tags": ["layout", "entry-module"] }, "dashboard": { - "tags": [ - "layout", - "entry-module" - ] + "tags": ["layout", "entry-module"] }, "not-found": { - "tags": [ - "entry-module" - ] + "tags": ["entry-module"] }, "experiments": { - "tags": [ - "child-module" - ] + "tags": ["child-module"] }, "widgets": { - "tags": [ - "child-module" - ] + "tags": ["child-module"] }, "material": { - "tags": [ - "shared-module" - ] + "tags": ["shared-module"] }, "animations": { - "tags": [ - "utils" - ] + "tags": ["utils"] }, "utils": { - "tags": [ - "utils" - ] + "tags": ["utils"] }, "auth": { - "tags": [ - "private-module", - "core-module" - ] + "tags": ["private-module", "core-module"] }, "shared": { - "tags": [ - "shared-module" - ] + "tags": ["shared-module"] }, "app-confirm": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "draggable": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "breadcrumbs": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "scroll-to-top": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "scrollbar": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "context-menu": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "theme-picker": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "quickpanel": { - "tags": [ - "private-module" - ] + "tags": ["private-module"] }, "svg-viewer": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "led": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "chat-box": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "json-diff": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "toolbar": { - "tags": [ - "private-module" - ] + "tags": ["private-module"] }, "sidenav": { - "tags": [ - "private-module" - ] + "tags": ["private-module"] }, "loading-overlay": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "grid": { - "tags": [ - "child-module" - ] + "tags": ["child-module"] }, "notifications": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "core": { - "tags": [ - "core-module" - ] + "tags": ["core-module"] }, "clap": { - "tags": [ - "public-module" - ] + "tags": ["public-module"] }, "image-comparison": { - "tags": [ - "public-module" - ] - }, - "models": { - "tags": [ - "utils" - ] + "tags": ["public-module"] }, "ngx-utils": { - "tags": [ - "public-module", - "utils" - ] + "tags": ["public-module", "utils"] }, "admin": { - "tags": [ - "entry-module" - ] + "tags": ["entry-module"] } } } diff --git a/stories/howto.md b/stories/howto.md index 3727e3002..ec8faba12 100644 --- a/stories/howto.md +++ b/stories/howto.md @@ -233,3 +233,30 @@ ``` + +
+ + + #### How to enable SCSS ``@import` for lib modules? + + + > if you SCSS `@import` in your lib module like in [led](../libs/led/src/lib/led.component.scss), + you may want to add `IncludePaths` setting. Add this to your `ng-package.json` + ```json + { + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/libs/led", + "lib": { + "entryFile": "src/index.ts", + "styleIncludePaths": [ + "../../apps/webapp/src/styles" + ] + } + } + ``` +
+ + + +Build Error: No name was provided for external module 'date-fns/esm' in output.globals – guessing 'esm' +Solution: Add umdModuleIds to `ng-package.json` diff --git a/tsconfig.json b/tsconfig.json index 31b359741..d0c873ca7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,8 +21,8 @@ "@ngx-starter-kit/core": ["libs/core/src/index.ts"], "@ngx-starter-kit/shared": ["libs/shared/src/index.ts"], "@ngx-starter-kit/navigator": ["libs/navigator/src/index.ts"], - "@ngx-starter-kit/socketio-plugin": ["libs/socketio-plugin/src/index.ts"], - "@ngx-starter-kit/tree": ["libs/tree/src/index.ts"], + "@ngx-starter-kit/socketio-plugin": ["dist/libs/socketio-plugin", "libs/socketio-plugin/src/index.ts"], + "@ngx-starter-kit/tree": ["dist/libs/tree", "libs/tree/src/index.ts"], "@ngx-starter-kit/home": ["libs/home/src/index.ts"], "@ngx-starter-kit/dashboard": ["libs/dashboard/src/index.ts"], "@ngx-starter-kit/not-found": ["libs/not-found/src/index.ts"], @@ -30,31 +30,28 @@ "@ngx-starter-kit/widgets": ["libs/widgets/src/index.ts"], "@ngx-starter-kit/material": ["libs/material/src/index.ts"], "@ngx-starter-kit/animations": ["libs/animations/src/index.ts"], - "@ngx-starter-kit/utils": ["libs/utils/src/index.ts"], + "@ngx-starter-kit/utils": ["dist/libs/utils", "libs/utils/src/index.ts"], "@ngx-starter-kit/auth": ["libs/auth/src/index.ts"], - "@ngx-starter-kit/app-confirm": ["libs/app-confirm/src/index.ts"], - "@ngx-starter-kit/draggable": ["libs/draggable/src/index.ts"], - "@ngx-starter-kit/breadcrumbs": ["libs/breadcrumbs/src/index.ts"], - "@ngx-starter-kit/scroll-to-top": ["libs/scroll-to-top/src/index.ts"], - "@ngx-starter-kit/scrollbar": ["libs/scrollbar/src/index.ts"], - "@ngx-starter-kit/context-menu": ["libs/context-menu/src/index.ts"], - "@ngx-starter-kit/theme-picker": ["libs/theme-picker/src/index.ts"], + "@ngx-starter-kit/app-confirm": ["dist/libs/app-confirm", "libs/app-confirm/src/index.ts"], + "@ngx-starter-kit/draggable": ["dist/libs/draggable", "libs/draggable/src/index.ts"], + "@ngx-starter-kit/breadcrumbs": ["dist/libs/breadcrumbs", "libs/breadcrumbs/src/index.ts"], + "@ngx-starter-kit/scroll-to-top": ["dist/libs/scroll-to-top", "libs/scroll-to-top/src/index.ts"], + "@ngx-starter-kit/scrollbar": ["dist/libs/scrollbar", "libs/scrollbar/src/index.ts"], + "@ngx-starter-kit/context-menu": ["dist/libs/context-menu", "libs/context-menu/src/index.ts"], + "@ngx-starter-kit/theme-picker": ["dist/libs/theme-picker", "libs/theme-picker/src/index.ts"], "@ngx-starter-kit/quickpanel": ["libs/quickpanel/src/index.ts"], - "@ngx-starter-kit/svg-viewer": ["libs/svg-viewer/src/index.ts"], - "@ngx-starter-kit/led": ["libs/led/src/index.ts"], - "@ngx-starter-kit/chat-box": ["libs/chat-box/src/index.ts"], - "@ngx-starter-kit/json-diff": ["libs/json-diff/src/index.ts"], + "@ngx-starter-kit/svg-viewer": ["dist/libs/svg-viewer", "libs/svg-viewer/src/index.ts"], + "@ngx-starter-kit/led": ["dist/libs/led", "libs/led/src/index.ts"], + "@ngx-starter-kit/chat-box": ["dist/libs/chat-box", "libs/chat-box/src/index.ts"], + "@ngx-starter-kit/json-diff": ["dist/libs/json-diff", "libs/json-diff/src/index.ts"], "@ngx-starter-kit/toolbar": ["libs/toolbar/src/index.ts"], "@ngx-starter-kit/sidenav": ["libs/sidenav/src/index.ts"], - "@ngx-starter-kit/loading-overlay": ["libs/loading-overlay/src/index.ts"], + "@ngx-starter-kit/loading-overlay": ["dist/libs/loading-overlay", "libs/loading-overlay/src/index.ts"], "@ngx-starter-kit/grid": ["libs/grid/src/index.ts"], - "notifications/*": ["dist/notifications/*"], - "@ngx-starter-kit/notifications": ["libs/notifications/src/index.ts"], - "clap/*": ["dist/clap/*"], - "@ngx-starter-kit/clap": ["libs/clap/src/index.ts"], - "image-comparison/*": ["dist/image-comparison/*"], - "@ngx-starter-kit/image-comparison": ["libs/image-comparison/src/index.ts"], - "@ngx-starter-kit/ngx-utils": ["libs/ngx-utils/src/index.ts"], + "@ngx-starter-kit/notifications": ["dist/libs/notifications", "libs/notifications/src/index.ts"], + "@ngx-starter-kit/clap": ["dist/libs/clap", "libs/clap/src/index.ts"], + "@ngx-starter-kit/image-comparison": ["dist/libs/image-comparison", "libs/image-comparison/src/index.ts"], + "@ngx-starter-kit/ngx-utils": ["dist/libs/ngx-utils", "libs/ngx-utils/src/index.ts"], "@ngx-starter-kit/admin": ["libs/admin/src/index.ts"] } },