mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[AAE-11496] Build and publish aca-about and aca-settings (#2942)
* [AAE-11496] Build and publish aca-about and aca-content * added libs to publish
This commit is contained in:
11
projects/aca-about/ng-package.json
Normal file
11
projects/aca-about/ng-package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/@alfresco/aca-about",
|
||||
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
},
|
||||
"assets": [
|
||||
"assets"
|
||||
]
|
||||
}
|
11
projects/aca-about/package.json
Normal file
11
projects/aca-about/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@alfresco/aca-about",
|
||||
"version": "0.0.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^14.1.0",
|
||||
"@angular/core": "^14.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
|
||||
<adf-about-panel *ngIf="dev" [label]="'ABOUT.PACKAGES.TITLE' | translate">
|
||||
<ng-template>
|
||||
<adf-about-package-list [dependencies]="pkg?.dependencies"></adf-about-package-list>
|
||||
<adf-about-package-list [dependencies]="packageJson?.dependencies"></adf-about-package-list>
|
||||
</ng-template>
|
||||
</adf-about-panel>
|
||||
|
||||
|
@@ -23,12 +23,12 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, Inject, OnInit, Optional } from '@angular/core';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
import pkg from 'package.json';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { AuthenticationService, DiscoveryApiService, RepositoryInfo } from '@alfresco/adf-core';
|
||||
import { PACKAGE_JSON } from './package-json.token';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-page',
|
||||
@@ -43,12 +43,14 @@ export class AboutComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
@Inject(DEV_MODE_TOKEN) devMode,
|
||||
@Optional()
|
||||
@Inject(PACKAGE_JSON)
|
||||
public packageJson,
|
||||
private authService: AuthenticationService,
|
||||
private appExtensions: AppExtensionService,
|
||||
private discovery: DiscoveryApiService
|
||||
) {
|
||||
this.dev = !devMode;
|
||||
this.pkg = pkg;
|
||||
this.extensions$ = this.appExtensions.references$;
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { ModuleWithProviders, NgModule, Provider } from '@angular/core';
|
||||
import { AboutComponent } from './about.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
@@ -31,6 +31,7 @@ import { SharedModule, PageLayoutModule } from '@alfresco/aca-shared';
|
||||
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
import { PACKAGE_JSON } from './package-json.token';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild(), SharedModule, PageLayoutModule],
|
||||
@@ -44,10 +45,19 @@ export class AcaAboutModule {
|
||||
});
|
||||
}
|
||||
|
||||
public static forRoot(devMode: any): ModuleWithProviders<AcaAboutModule> {
|
||||
public static forRoot(devMode: any, packageJson?: any): ModuleWithProviders<AcaAboutModule> {
|
||||
const providers: Provider[] = [{ provide: DEV_MODE_TOKEN, useValue: devMode }];
|
||||
|
||||
if (packageJson) {
|
||||
providers.push({
|
||||
provide: PACKAGE_JSON,
|
||||
useValue: packageJson
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
ngModule: AcaAboutModule,
|
||||
providers: [{ provide: DEV_MODE_TOKEN, useValue: devMode }]
|
||||
providers
|
||||
};
|
||||
}
|
||||
}
|
||||
|
3
projects/aca-about/src/lib/package-json.token.ts
Normal file
3
projects/aca-about/src/lib/package-json.token.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
export const PACKAGE_JSON = new InjectionToken<any>('PACKAGE_JSON');
|
@@ -25,3 +25,4 @@
|
||||
|
||||
export * from './lib/about.component';
|
||||
export * from './lib/aca-about.module';
|
||||
export * from './lib/package-json.token';
|
||||
|
@@ -2,7 +2,12 @@
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"declarationMap": false
|
||||
"declarationMap": false,
|
||||
"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"]
|
||||
}
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"compilationMode": "partial"
|
||||
|
8
projects/aca-settings/ng-package.json
Normal file
8
projects/aca-settings/ng-package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/@alfresco/aca-settings",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
},
|
||||
"assets": ["assets"]
|
||||
}
|
11
projects/aca-settings/package.json
Normal file
11
projects/aca-settings/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@alfresco/aca-settings",
|
||||
"version": "0.0.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^14.1.0",
|
||||
"@angular/core": "^14.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
@@ -2,7 +2,12 @@
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"declarationMap": false
|
||||
"declarationMap": false,
|
||||
"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"]
|
||||
}
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"compilationMode": "partial"
|
||||
|
Reference in New Issue
Block a user