mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +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:
parent
eae27eade6
commit
7a176eb9a2
@ -483,7 +483,8 @@
|
|||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/aca-about/tsconfig.lib.prod.json"
|
"tsConfig": "projects/aca-about/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultConfiguration": "production"
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
@ -523,7 +524,8 @@
|
|||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/aca-settings/tsconfig.lib.prod.json"
|
"tsConfig": "projects/aca-settings/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultConfiguration": "production"
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
@ -29,12 +29,13 @@ import { AcaAboutModule } from '@alfresco/aca-about';
|
|||||||
import { AcaSettingsModule } from '@alfresco/aca-settings';
|
import { AcaSettingsModule } from '@alfresco/aca-settings';
|
||||||
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
|
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
|
||||||
import { environment } from '../environments/environment';
|
import { environment } from '../environments/environment';
|
||||||
|
import packageJson from 'package.json';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
AosExtensionModule,
|
AosExtensionModule,
|
||||||
...(environment.devTools ? [AcaSettingsModule] : []),
|
...(environment.devTools ? [AcaSettingsModule] : []),
|
||||||
AcaAboutModule.forRoot(environment.production),
|
AcaAboutModule.forRoot(environment.production, packageJson),
|
||||||
AcaFolderRulesModule
|
AcaFolderRulesModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
|
"prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
|
||||||
"build": "ng build content-ce",
|
"build": "ng build content-ce",
|
||||||
"build.release": "npm run build -- --configuration=production,release",
|
"build.release": "npm run build -- --configuration=production,release",
|
||||||
"build-libs": "ng build aca-shared && ng build adf-office-services-ext",
|
"build-libs": "ng build aca-shared && ng build adf-office-services-ext && ng build aca-settings && ng build aca-about ",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"test:ci": "ng test adf-office-services-ext && ng test content-ce --code-coverage",
|
"test:ci": "ng test adf-office-services-ext && ng test content-ce --code-coverage",
|
||||||
"lint": "NODE_OPTIONS=--max_old_space_size=4096 ng lint && npm run spellcheck && npm run e2e.typecheck",
|
"lint": "NODE_OPTIONS=--max_old_space_size=4096 ng lint && npm run spellcheck && npm run e2e.typecheck",
|
||||||
|
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">
|
<adf-about-panel *ngIf="dev" [label]="'ABOUT.PACKAGES.TITLE' | translate">
|
||||||
<ng-template>
|
<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>
|
</ng-template>
|
||||||
</adf-about-panel>
|
</adf-about-panel>
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* 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 { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||||
import pkg from 'package.json';
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
||||||
import { AuthenticationService, DiscoveryApiService, RepositoryInfo } from '@alfresco/adf-core';
|
import { AuthenticationService, DiscoveryApiService, RepositoryInfo } from '@alfresco/adf-core';
|
||||||
|
import { PACKAGE_JSON } from './package-json.token';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about-page',
|
selector: 'app-about-page',
|
||||||
@ -43,12 +43,14 @@ export class AboutComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DEV_MODE_TOKEN) devMode,
|
@Inject(DEV_MODE_TOKEN) devMode,
|
||||||
|
@Optional()
|
||||||
|
@Inject(PACKAGE_JSON)
|
||||||
|
public packageJson,
|
||||||
private authService: AuthenticationService,
|
private authService: AuthenticationService,
|
||||||
private appExtensions: AppExtensionService,
|
private appExtensions: AppExtensionService,
|
||||||
private discovery: DiscoveryApiService
|
private discovery: DiscoveryApiService
|
||||||
) {
|
) {
|
||||||
this.dev = !devMode;
|
this.dev = !devMode;
|
||||||
this.pkg = pkg;
|
|
||||||
this.extensions$ = this.appExtensions.references$;
|
this.extensions$ = this.appExtensions.references$;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* 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 { AboutComponent } from './about.component';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
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 { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||||
|
import { PACKAGE_JSON } from './package-json.token';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, CoreModule.forChild(), SharedModule, PageLayoutModule],
|
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 {
|
return {
|
||||||
ngModule: AcaAboutModule,
|
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/about.component';
|
||||||
export * from './lib/aca-about.module';
|
export * from './lib/aca-about.module';
|
||||||
|
export * from './lib/package-json.token';
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.lib.json",
|
"extends": "./tsconfig.lib.json",
|
||||||
"compilerOptions": {
|
"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": {
|
"angularCompilerOptions": {
|
||||||
"compilationMode": "partial"
|
"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",
|
"extends": "./tsconfig.lib.json",
|
||||||
"compilerOptions": {
|
"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": {
|
"angularCompilerOptions": {
|
||||||
"compilationMode": "partial"
|
"compilationMode": "partial"
|
||||||
|
@ -41,6 +41,8 @@ echo -e "Branch is '$TRAVIS_BRANCH', therefore publish with '$TAG_NPM' tag\n"
|
|||||||
PROJECTS=(
|
PROJECTS=(
|
||||||
'aca-shared'
|
'aca-shared'
|
||||||
'adf-office-services-ext'
|
'adf-office-services-ext'
|
||||||
|
'aca-settings'
|
||||||
|
'aca-about'
|
||||||
);
|
);
|
||||||
|
|
||||||
for PROJECT in "${PROJECTS[@]}"
|
for PROJECT in "${PROJECTS[@]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user