From caff4a38004f0fdd3ad7a959295faeabbd921b26 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 28 Jun 2023 09:01:21 +0100 Subject: [PATCH] [ACS-5523] move viewer and preview to aca-content (#3303) * move aca-viewer to secondary entry * move aca-preview to aca-content --- .github/actions/publish-libs/npm-publish.sh | 2 - .../update-lib-versions.sh | 2 - .github/workflows/pull-request.yml | 1 - projects/aca-content/preview/ng-package.json | 5 ++ .../src/lib/components/preview.component.html | 0 .../src/lib/components/preview.component.scss | 0 .../lib/components/preview.component.spec.ts | 0 .../src/lib/components/preview.component.ts | 0 .../preview}/src/lib/preview.module.ts | 0 .../preview}/src/public-api.ts | 0 .../preview}/src/test.ts | 0 .../aca-content/src/lib/aca-content.module.ts | 2 +- .../aca-content/src/lib/aca-content.routes.ts | 52 ++++++++--------- projects/aca-content/tsconfig.lib.prod.json | 4 +- projects/aca-content/viewer/ng-package.json | 5 ++ .../components/viewer/viewer.component.html | 0 .../components/viewer/viewer.component.scss | 0 .../lib/components/viewer/viewer.component.ts | 0 .../viewer}/src/lib/viewer.module.ts | 0 .../viewer}/src/public-api.ts | 0 .../viewer}/src/test.ts | 0 projects/aca-preview/.eslintrc.js | 23 -------- projects/aca-preview/README.md | 24 -------- projects/aca-preview/karma.conf.js | 15 ----- projects/aca-preview/ng-package.json | 7 --- projects/aca-preview/package.json | 19 ------- projects/aca-preview/project.json | 56 ------------------- projects/aca-preview/tsconfig.lib.json | 15 ----- projects/aca-preview/tsconfig.lib.prod.json | 14 ----- projects/aca-preview/tsconfig.spec.adf.json | 16 ------ projects/aca-preview/tsconfig.spec.json | 17 ------ projects/aca-viewer/.eslintrc.js | 23 -------- projects/aca-viewer/README.md | 24 -------- projects/aca-viewer/karma.conf.js | 15 ----- projects/aca-viewer/ng-package.json | 7 --- projects/aca-viewer/package.json | 19 ------- projects/aca-viewer/project.json | 51 ----------------- projects/aca-viewer/tsconfig.lib.json | 15 ----- projects/aca-viewer/tsconfig.lib.prod.json | 14 ----- projects/aca-viewer/tsconfig.spec.json | 17 ------ tsconfig.adf.json | 4 +- tsconfig.json | 4 +- 42 files changed, 42 insertions(+), 430 deletions(-) create mode 100644 projects/aca-content/preview/ng-package.json rename projects/{aca-preview => aca-content/preview}/src/lib/components/preview.component.html (100%) rename projects/{aca-preview => aca-content/preview}/src/lib/components/preview.component.scss (100%) rename projects/{aca-preview => aca-content/preview}/src/lib/components/preview.component.spec.ts (100%) rename projects/{aca-preview => aca-content/preview}/src/lib/components/preview.component.ts (100%) rename projects/{aca-preview => aca-content/preview}/src/lib/preview.module.ts (100%) rename projects/{aca-preview => aca-content/preview}/src/public-api.ts (100%) rename projects/{aca-preview => aca-content/preview}/src/test.ts (100%) create mode 100644 projects/aca-content/viewer/ng-package.json rename projects/{aca-viewer => aca-content/viewer}/src/lib/components/viewer/viewer.component.html (100%) rename projects/{aca-viewer => aca-content/viewer}/src/lib/components/viewer/viewer.component.scss (100%) rename projects/{aca-viewer => aca-content/viewer}/src/lib/components/viewer/viewer.component.ts (100%) rename projects/{aca-viewer => aca-content/viewer}/src/lib/viewer.module.ts (100%) rename projects/{aca-viewer => aca-content/viewer}/src/public-api.ts (100%) rename projects/{aca-viewer => aca-content/viewer}/src/test.ts (100%) delete mode 100644 projects/aca-preview/.eslintrc.js delete mode 100644 projects/aca-preview/README.md delete mode 100644 projects/aca-preview/karma.conf.js delete mode 100644 projects/aca-preview/ng-package.json delete mode 100644 projects/aca-preview/package.json delete mode 100644 projects/aca-preview/project.json delete mode 100644 projects/aca-preview/tsconfig.lib.json delete mode 100644 projects/aca-preview/tsconfig.lib.prod.json delete mode 100644 projects/aca-preview/tsconfig.spec.adf.json delete mode 100644 projects/aca-preview/tsconfig.spec.json delete mode 100644 projects/aca-viewer/.eslintrc.js delete mode 100644 projects/aca-viewer/README.md delete mode 100644 projects/aca-viewer/karma.conf.js delete mode 100644 projects/aca-viewer/ng-package.json delete mode 100644 projects/aca-viewer/package.json delete mode 100644 projects/aca-viewer/project.json delete mode 100644 projects/aca-viewer/tsconfig.lib.json delete mode 100644 projects/aca-viewer/tsconfig.lib.prod.json delete mode 100644 projects/aca-viewer/tsconfig.spec.json diff --git a/.github/actions/publish-libs/npm-publish.sh b/.github/actions/publish-libs/npm-publish.sh index 49b97a2327..f8f3727de6 100755 --- a/.github/actions/publish-libs/npm-publish.sh +++ b/.github/actions/publish-libs/npm-publish.sh @@ -12,9 +12,7 @@ fi export PROJECTS=( 'aca-content' - 'aca-preview' 'aca-shared' - 'aca-viewer' ); for PROJECT in ${PROJECTS[@]} diff --git a/.github/actions/update-library-versions/update-lib-versions.sh b/.github/actions/update-library-versions/update-lib-versions.sh index 5b983fabc4..a7254d6c8c 100755 --- a/.github/actions/update-library-versions/update-lib-versions.sh +++ b/.github/actions/update-library-versions/update-lib-versions.sh @@ -11,9 +11,7 @@ fi export PROJECTS=( 'aca-content' - 'aca-preview' 'aca-shared' - 'aca-viewer' ); for PROJECT in ${PROJECTS[@]} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 063acda24a..d2afee1d2d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -106,7 +106,6 @@ jobs: unit-tests: - name: "aca-content" - name: "aca-shared" - - name: "aca-preview" steps: - name: Checkout uses: actions/checkout@v3 diff --git a/projects/aca-content/preview/ng-package.json b/projects/aca-content/preview/ng-package.json new file mode 100644 index 0000000000..fbafcc4448 --- /dev/null +++ b/projects/aca-content/preview/ng-package.json @@ -0,0 +1,5 @@ +{ + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/projects/aca-preview/src/lib/components/preview.component.html b/projects/aca-content/preview/src/lib/components/preview.component.html similarity index 100% rename from projects/aca-preview/src/lib/components/preview.component.html rename to projects/aca-content/preview/src/lib/components/preview.component.html diff --git a/projects/aca-preview/src/lib/components/preview.component.scss b/projects/aca-content/preview/src/lib/components/preview.component.scss similarity index 100% rename from projects/aca-preview/src/lib/components/preview.component.scss rename to projects/aca-content/preview/src/lib/components/preview.component.scss diff --git a/projects/aca-preview/src/lib/components/preview.component.spec.ts b/projects/aca-content/preview/src/lib/components/preview.component.spec.ts similarity index 100% rename from projects/aca-preview/src/lib/components/preview.component.spec.ts rename to projects/aca-content/preview/src/lib/components/preview.component.spec.ts diff --git a/projects/aca-preview/src/lib/components/preview.component.ts b/projects/aca-content/preview/src/lib/components/preview.component.ts similarity index 100% rename from projects/aca-preview/src/lib/components/preview.component.ts rename to projects/aca-content/preview/src/lib/components/preview.component.ts diff --git a/projects/aca-preview/src/lib/preview.module.ts b/projects/aca-content/preview/src/lib/preview.module.ts similarity index 100% rename from projects/aca-preview/src/lib/preview.module.ts rename to projects/aca-content/preview/src/lib/preview.module.ts diff --git a/projects/aca-preview/src/public-api.ts b/projects/aca-content/preview/src/public-api.ts similarity index 100% rename from projects/aca-preview/src/public-api.ts rename to projects/aca-content/preview/src/public-api.ts diff --git a/projects/aca-preview/src/test.ts b/projects/aca-content/preview/src/test.ts similarity index 100% rename from projects/aca-preview/src/test.ts rename to projects/aca-content/preview/src/test.ts diff --git a/projects/aca-content/src/lib/aca-content.module.ts b/projects/aca-content/src/lib/aca-content.module.ts index ac48d850a6..9f99561b3c 100644 --- a/projects/aca-content/src/lib/aca-content.module.ts +++ b/projects/aca-content/src/lib/aca-content.module.ts @@ -77,7 +77,7 @@ import { CommentsTabComponent } from './components/info-drawer/comments-tab/comm import { LibraryMetadataTabComponent } from './components/info-drawer/library-metadata-tab/library-metadata-tab.component'; import { MetadataTabComponent } from './components/info-drawer/metadata-tab/metadata-tab.component'; import { VersionsTabComponent } from './components/info-drawer/versions-tab/versions-tab.component'; -import { PreviewComponent } from '@alfresco/aca-preview'; +import { PreviewComponent } from '@alfresco/aca-content/preview'; import { ToggleEditOfflineComponent } from './components/toolbar/toggle-edit-offline/toggle-edit-offline.component'; import { ToggleFavoriteLibraryComponent } from './components/toolbar/toggle-favorite-library/toggle-favorite-library.component'; import { ToggleFavoriteComponent } from './components/toolbar/toggle-favorite/toggle-favorite.component'; diff --git a/projects/aca-content/src/lib/aca-content.routes.ts b/projects/aca-content/src/lib/aca-content.routes.ts index 3c720c96ba..4d1b455903 100644 --- a/projects/aca-content/src/lib/aca-content.routes.ts +++ b/projects/aca-content/src/lib/aca-content.routes.ts @@ -64,7 +64,7 @@ export const CONTENT_ROUTES: ExtensionRoute[] = [ children: [ { path: '', - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -120,7 +120,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'personal-files' } @@ -134,7 +134,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'personal-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -147,7 +147,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'personal-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -173,14 +173,14 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'personal-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'personal-files' } @@ -188,7 +188,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: ':folderId/preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'personal-files' } @@ -202,7 +202,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'personal-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -235,7 +235,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'libraries' } @@ -249,7 +249,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'libraries' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ], data: { @@ -265,7 +265,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'libraries' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -309,7 +309,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'libraries' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -322,7 +322,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'libraries' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -347,7 +347,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'favorites' } @@ -361,7 +361,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'favorites' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -374,7 +374,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'favorites' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -398,7 +398,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'recent-files' } @@ -412,7 +412,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'recent-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -425,7 +425,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'recent-files' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -447,7 +447,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'shared' } @@ -461,7 +461,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'shared' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -474,7 +474,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'shared' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -508,7 +508,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { // deprecated, backwards compatibility with ACA 1.8 { path: 'preview/:nodeId', - loadChildren: () => import('@alfresco/aca-preview').then((m) => m.PreviewModule), + loadChildren: () => import('@alfresco/aca-content/preview').then((m) => m.PreviewModule), data: { navigateSource: 'search' } @@ -522,7 +522,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'search' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] }, @@ -535,7 +535,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'search' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } @@ -560,7 +560,7 @@ export const CONTENT_LAYOUT_ROUTES: Route = { data: { navigateSource: 'search' }, - loadChildren: () => import('@alfresco/aca-viewer').then((m) => m.AcaViewerModule) + loadChildren: () => import('@alfresco/aca-content/viewer').then((m) => m.AcaViewerModule) } ] } diff --git a/projects/aca-content/tsconfig.lib.prod.json b/projects/aca-content/tsconfig.lib.prod.json index de0d99b652..3e010567af 100644 --- a/projects/aca-content/tsconfig.lib.prod.json +++ b/projects/aca-content/tsconfig.lib.prod.json @@ -6,9 +6,7 @@ "paths": { "@alfresco/aca-shared": ["dist/@alfresco/aca-shared"], "@alfresco/aca-shared/store": ["dist/@alfresco/aca-shared/store"], - "@alfresco/aca-shared/rules": ["dist/@alfresco/aca-shared/rules"], - "@alfresco/aca-viewer": ["dist/@alfresco/aca-viewer"], - "@alfresco/aca-preview": ["dist/@alfresco/aca-preview"] + "@alfresco/aca-shared/rules": ["dist/@alfresco/aca-shared/rules"] }, }, "angularCompilerOptions": { diff --git a/projects/aca-content/viewer/ng-package.json b/projects/aca-content/viewer/ng-package.json new file mode 100644 index 0000000000..fbafcc4448 --- /dev/null +++ b/projects/aca-content/viewer/ng-package.json @@ -0,0 +1,5 @@ +{ + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/projects/aca-viewer/src/lib/components/viewer/viewer.component.html b/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.html similarity index 100% rename from projects/aca-viewer/src/lib/components/viewer/viewer.component.html rename to projects/aca-content/viewer/src/lib/components/viewer/viewer.component.html diff --git a/projects/aca-viewer/src/lib/components/viewer/viewer.component.scss b/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.scss similarity index 100% rename from projects/aca-viewer/src/lib/components/viewer/viewer.component.scss rename to projects/aca-content/viewer/src/lib/components/viewer/viewer.component.scss diff --git a/projects/aca-viewer/src/lib/components/viewer/viewer.component.ts b/projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts similarity index 100% rename from projects/aca-viewer/src/lib/components/viewer/viewer.component.ts rename to projects/aca-content/viewer/src/lib/components/viewer/viewer.component.ts diff --git a/projects/aca-viewer/src/lib/viewer.module.ts b/projects/aca-content/viewer/src/lib/viewer.module.ts similarity index 100% rename from projects/aca-viewer/src/lib/viewer.module.ts rename to projects/aca-content/viewer/src/lib/viewer.module.ts diff --git a/projects/aca-viewer/src/public-api.ts b/projects/aca-content/viewer/src/public-api.ts similarity index 100% rename from projects/aca-viewer/src/public-api.ts rename to projects/aca-content/viewer/src/public-api.ts diff --git a/projects/aca-viewer/src/test.ts b/projects/aca-content/viewer/src/test.ts similarity index 100% rename from projects/aca-viewer/src/test.ts rename to projects/aca-content/viewer/src/test.ts diff --git a/projects/aca-preview/.eslintrc.js b/projects/aca-preview/.eslintrc.js deleted file mode 100644 index 9e780e164b..0000000000 --- a/projects/aca-preview/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -path = require("path"); -module.exports = { - "extends": "../../.eslintrc.json", - "ignorePatterns": [ - "!**/*" - ], - "overrides": [ - { - "files": [ - "*.ts" - ], - "parserOptions": { - "project": [ - path.join(__dirname, "tsconfig.lib.json"), - path.join(__dirname, "tsconfig.spec.json") - ], - "createDefaultProgram": true - }, - "rules": { - } - } - ] -} diff --git a/projects/aca-preview/README.md b/projects/aca-preview/README.md deleted file mode 100644 index 25607cc892..0000000000 --- a/projects/aca-preview/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# AcaPreview - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0. - -## Code scaffolding - -Run `nx generate component component-name --project aca-preview` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-preview`. -> Note: Don't forget to add `--project aca-preview` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `nx build aca-preview` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `nx build aca-preview`, go to the dist folder `cd dist/aca-preview` and run `npm publish`. - -## Running unit tests - -Run `nx test aca-preview` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page. diff --git a/projects/aca-preview/karma.conf.js b/projects/aca-preview/karma.conf.js deleted file mode 100644 index 10f4d7f1f3..0000000000 --- a/projects/aca-preview/karma.conf.js +++ /dev/null @@ -1,15 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html -const { join } = require('path'); -const getBaseKarmaConfig = require('../../karma.conf'); - -module.exports = function (config) { - const baseConfig = getBaseKarmaConfig(); - config.set({ - ...baseConfig, - coverageReporter: { - ...baseConfig.coverageReporter, - dir: join(__dirname, '../../coverage/aca-preview'), - }, - }); -}; diff --git a/projects/aca-preview/ng-package.json b/projects/aca-preview/ng-package.json deleted file mode 100644 index 9ccc65576a..0000000000 --- a/projects/aca-preview/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/@alfresco/aca-preview", - "lib": { - "entryFile": "src/public-api.ts" - } -} diff --git a/projects/aca-preview/package.json b/projects/aca-preview/package.json deleted file mode 100644 index 755b030db2..0000000000 --- a/projects/aca-preview/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@alfresco/aca-preview", - "version": "0.0.1", - "license": "LGPL-3.0", - "peerDependencies": { - "@angular/common": "^14.1.0", - "@angular/core": "^14.1.0" - }, - "dependencies": { - "tslib": "^2.3.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/Alfresco/alfresco-content-app.git" - } -} diff --git a/projects/aca-preview/project.json b/projects/aca-preview/project.json deleted file mode 100644 index 23ce76f37d..0000000000 --- a/projects/aca-preview/project.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "name": "aca-preview", - "projectType": "library", - "sourceRoot": "projects/aca-preview/src", - "prefix": "lib", - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:ng-packagr", - "options": { - "project": "projects/aca-preview/ng-package.json" - }, - "configurations": { - "production": { - "tsConfig": "projects/aca-preview/tsconfig.lib.prod.json" - }, - "development": { - "tsConfig": "projects/aca-preview/tsconfig.lib.json" - } - }, - "defaultConfiguration": "production", - "outputs": [ - "{workspaceRoot}/dist/@alfresco/aca-preview" - ] - }, - "test": { - "executor": "@angular-devkit/build-angular:karma", - "options": { - "codeCoverage": true, - "main": "projects/aca-preview/src/test.ts", - "tsConfig": "projects/aca-preview/tsconfig.spec.json", - "karmaConfig": "projects/aca-preview/karma.conf.js" - }, - "configurations": { - "adfprod": { - "tsConfig": "projects/aca-preview/tsconfig.spec.adf.json" - } - } - }, - "lint": { - "executor": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "projects/aca-preview/**/*.ts", - "projects/aca-preview/**/*.html" - ], - "cache": true, - "cacheLocation": ".eslintcache", - "ignorePath": ".eslintignore" - }, - "outputs": [ - "{options.outputFile}" - ] - } - } -} diff --git a/projects/aca-preview/tsconfig.lib.json b/projects/aca-preview/tsconfig.lib.json deleted file mode 100644 index b77b13c010..0000000000 --- a/projects/aca-preview/tsconfig.lib.json +++ /dev/null @@ -1,15 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "declaration": true, - "declarationMap": true, - "inlineSources": true, - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/projects/aca-preview/tsconfig.lib.prod.json b/projects/aca-preview/tsconfig.lib.prod.json deleted file mode 100644 index 77afbff6a8..0000000000 --- a/projects/aca-preview/tsconfig.lib.prod.json +++ /dev/null @@ -1,14 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.lib.json", - "compilerOptions": { - "declarationMap": false, - "paths": { - "@alfresco/aca-shared": ["dist/@alfresco/aca-shared"], - "@alfresco/aca-shared/store": ["dist/@alfresco/aca-shared/store"], - } - }, - "angularCompilerOptions": { - "compilationMode": "partial" - } -} diff --git a/projects/aca-preview/tsconfig.spec.adf.json b/projects/aca-preview/tsconfig.spec.adf.json deleted file mode 100644 index 04a6994be7..0000000000 --- a/projects/aca-preview/tsconfig.spec.adf.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.adf.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/projects/aca-preview/tsconfig.spec.json b/projects/aca-preview/tsconfig.spec.json deleted file mode 100644 index 715dd0a5d2..0000000000 --- a/projects/aca-preview/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/projects/aca-viewer/.eslintrc.js b/projects/aca-viewer/.eslintrc.js deleted file mode 100644 index 9e780e164b..0000000000 --- a/projects/aca-viewer/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -path = require("path"); -module.exports = { - "extends": "../../.eslintrc.json", - "ignorePatterns": [ - "!**/*" - ], - "overrides": [ - { - "files": [ - "*.ts" - ], - "parserOptions": { - "project": [ - path.join(__dirname, "tsconfig.lib.json"), - path.join(__dirname, "tsconfig.spec.json") - ], - "createDefaultProgram": true - }, - "rules": { - } - } - ] -} diff --git a/projects/aca-viewer/README.md b/projects/aca-viewer/README.md deleted file mode 100644 index 2bb2787fd2..0000000000 --- a/projects/aca-viewer/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# AcaViewer - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0. - -## Code scaffolding - -Run `nx generate component component-name --project aca-viewer` to generate a new component. You can also use `nx generate directive|pipe|service|class|guard|interface|enum|module --project aca-viewer`. -> Note: Don't forget to add `--project aca-viewer` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `nx build aca-viewer` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `nx build aca-viewer`, go to the dist folder `cd dist/aca-viewer` and run `npm publish`. - -## Running unit tests - -Run `nx test aca-viewer` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the NX use `nx help` or go check out the [NX documentation](https://nx.dev/getting-started/intro) page. diff --git a/projects/aca-viewer/karma.conf.js b/projects/aca-viewer/karma.conf.js deleted file mode 100644 index d24b4c381b..0000000000 --- a/projects/aca-viewer/karma.conf.js +++ /dev/null @@ -1,15 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html -const { join } = require('path'); -const getBaseKarmaConfig = require('../../karma.conf'); - -module.exports = function (config) { - const baseConfig = getBaseKarmaConfig(); - config.set({ - ...baseConfig, - coverageReporter: { - ...baseConfig.coverageReporter, - dir: join(__dirname, '../../coverage/aca-viewer'), - }, - }); -}; diff --git a/projects/aca-viewer/ng-package.json b/projects/aca-viewer/ng-package.json deleted file mode 100644 index b3b089b01c..0000000000 --- a/projects/aca-viewer/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/@alfresco/aca-viewer", - "lib": { - "entryFile": "src/public-api.ts" - } -} diff --git a/projects/aca-viewer/package.json b/projects/aca-viewer/package.json deleted file mode 100644 index 93a080dc44..0000000000 --- a/projects/aca-viewer/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@alfresco/aca-viewer", - "version": "0.0.1", - "license": "LGPL-3.0", - "peerDependencies": { - "@angular/common": "^14.1.0", - "@angular/core": "^14.1.0" - }, - "dependencies": { - "tslib": "^2.3.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/Alfresco/alfresco-content-app.git" - } -} diff --git a/projects/aca-viewer/project.json b/projects/aca-viewer/project.json deleted file mode 100644 index a6cf855619..0000000000 --- a/projects/aca-viewer/project.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "name": "aca-viewer", - "projectType": "library", - "sourceRoot": "projects/aca-viewer/src", - "prefix": "lib", - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:ng-packagr", - "options": { - "project": "projects/aca-viewer/ng-package.json" - }, - "configurations": { - "production": { - "tsConfig": "projects/aca-viewer/tsconfig.lib.prod.json" - }, - "development": { - "tsConfig": "projects/aca-viewer/tsconfig.lib.json" - } - }, - "defaultConfiguration": "production", - "outputs": [ - "{workspaceRoot}/dist/@alfresco/aca-viewer" - ] - }, - "test": { - "executor": "@angular-devkit/build-angular:karma", - "options": { - "codeCoverage": true, - "main": "projects/aca-viewer/src/test.ts", - "tsConfig": "projects/aca-viewer/tsconfig.spec.json", - "karmaConfig": "projects/aca-viewer/karma.conf.js" - } - }, - "lint": { - "executor": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "projects/aca-viewer/**/*.ts", - "projects/aca-viewer/**/*.html" - ], - "cache": true, - "cacheLocation": ".eslintcache", - "ignorePath": ".eslintignore" - }, - "outputs": [ - "{options.outputFile}" - ] - } - } -} diff --git a/projects/aca-viewer/tsconfig.lib.json b/projects/aca-viewer/tsconfig.lib.json deleted file mode 100644 index b77b13c010..0000000000 --- a/projects/aca-viewer/tsconfig.lib.json +++ /dev/null @@ -1,15 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "declaration": true, - "declarationMap": true, - "inlineSources": true, - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/projects/aca-viewer/tsconfig.lib.prod.json b/projects/aca-viewer/tsconfig.lib.prod.json deleted file mode 100644 index 77afbff6a8..0000000000 --- a/projects/aca-viewer/tsconfig.lib.prod.json +++ /dev/null @@ -1,14 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.lib.json", - "compilerOptions": { - "declarationMap": false, - "paths": { - "@alfresco/aca-shared": ["dist/@alfresco/aca-shared"], - "@alfresco/aca-shared/store": ["dist/@alfresco/aca-shared/store"], - } - }, - "angularCompilerOptions": { - "compilationMode": "partial" - } -} diff --git a/projects/aca-viewer/tsconfig.spec.json b/projects/aca-viewer/tsconfig.spec.json deleted file mode 100644 index 715dd0a5d2..0000000000 --- a/projects/aca-viewer/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/tsconfig.adf.json b/tsconfig.adf.json index 66df13c0be..015743b3b9 100644 --- a/tsconfig.adf.json +++ b/tsconfig.adf.json @@ -41,8 +41,8 @@ "@alfresco/aca-content/about": ["projects/aca-content/about/src/public-api.ts"], "@alfresco/aca-content/folder-rules": ["projects/aca-content/folder-rules/src/public-api.ts"], "@alfresco/aca-content": ["projects/aca-content/src/public-api.ts"], - "@alfresco/aca-viewer": ["projects/aca-viewer/src/public-api.ts"], - "@alfresco/aca-preview": ["projects/aca-preview/src/public-api.ts"], + "@alfresco/aca-content/viewer": ["projects/aca-content/viewer/src/public-api.ts"], + "@alfresco/aca-content/preview": ["projects/aca-content/preview/src/public-api.ts"], "package.json": ["package.json"], "*": ["./node_modules/*"] } diff --git a/tsconfig.json b/tsconfig.json index 399e90fe45..6b846a63f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,8 +29,8 @@ "@alfresco/aca-content/folder-rules": ["projects/aca-content/folder-rules/src/public-api.ts"], "@alfresco/aca-content": ["projects/aca-content/src/public-api.ts"], "@alfresco/aca-content/about": ["projects/aca-content/about/src/public-api.ts"], - "@alfresco/aca-viewer": ["projects/aca-viewer/src/public-api.ts"], - "@alfresco/aca-preview": ["projects/aca-preview/src/public-api.ts"], + "@alfresco/aca-content/viewer": ["projects/aca-content/viewer/src/public-api.ts"], + "@alfresco/aca-content/preview": ["projects/aca-content/preview/src/public-api.ts"], "@alfresco/playwright-shared": ["projects/aca-playwright-shared/src/index.ts"], "package.json": ["package.json"] }