[ADF-4857] Be able to run ng build content-service (#5183)

* Be able to build conten with ng build content-service

* fix tslint

* The translate module is necessary

* Rollback the build commands

* Rollback

* Remove wrong imports

* Trigger the build
This commit is contained in:
Maurizio Vitale
2019-10-24 19:23:30 +01:00
committed by Denys Vuika
parent 9fa1db063a
commit 6331979baa
401 changed files with 88 additions and 99 deletions

View File

@@ -601,7 +601,7 @@
}, },
"content-services": { "content-services": {
"root": "lib/content-services", "root": "lib/content-services",
"sourceRoot": "lib/content-services", "sourceRoot": "lib/content-services/src",
"projectType": "library", "projectType": "library",
"prefix": "adf", "prefix": "adf",
"architect": { "architect": {
@@ -620,7 +620,7 @@
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "lib/content-services/test.ts", "main": "lib/content-services/src/test.ts",
"tsConfig": "lib/content-services/tsconfig.spec.json", "tsConfig": "lib/content-services/tsconfig.spec.json",
"karmaConfig": "lib/content-services/karma.conf.js", "karmaConfig": "lib/content-services/karma.conf.js",
"codeCoverage": true, "codeCoverage": true,
@@ -632,7 +632,7 @@
"options": { "options": {
"tsConfig": [ "tsConfig": [
"lib/content-services/tsconfig.lib.json", "lib/content-services/tsconfig.lib.json",
"lib/content-services/tsconfig.lib.json" "lib/content-services/tsconfig.spec.json"
], ],
"exclude": [ "exclude": [
"**/node_modules/**" "**/node_modules/**"

View File

@@ -4,7 +4,7 @@
@import './app/components/process-service/process-service.component.scss'; @import './app/components/process-service/process-service.component.scss';
@import '../../lib/content-services/styles/index'; @import '../../lib/content-services/src/lib/styles/index';
@import '../../lib/process-services/src/lib/styles/index'; @import '../../lib/process-services/src/lib/styles/index';
@import '../../lib/insights/src/lib/styles/index'; @import '../../lib/insights/src/lib/styles/index';
@import '../../lib/core/styles/index'; @import '../../lib/core/styles/index';

View File

@@ -1,6 +1,6 @@
var Bundler = require('scss-bundle').Bundler; var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs-extra').writeFileSync; var writeFileSync = require('fs-extra').writeFileSync;
new Bundler().Bundle('./lib/content-services/styles/_index.scss', '**/*.scss').then(result => { new Bundler().Bundle('./lib/content-services/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent); writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent);
}); });

View File

@@ -14,7 +14,7 @@ var mkdirpSync = require('fs-extra').mkdirpSync;
writeFileSync('./lib/dist/process-services/_theming.scss', result.bundledContent); writeFileSync('./lib/dist/process-services/_theming.scss', result.bundledContent);
}); });
new Bundler().Bundle('./lib/content-services/styles/_index.scss', '**/*.scss').then(result => { new Bundler().Bundle('./lib/content-services/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent); writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent);
}); });

View File

@@ -15,22 +15,4 @@
* limitations under the License. * limitations under the License.
*/ */
export * from './directives/index'; export * from './src/public-api';
export * from './social/index';
export * from './tag/index';
export * from './webscript/index';
export * from './document-list/index';
export * from './upload/index';
export * from './search/index';
export * from './site-dropdown/index';
export * from './breadcrumb/index';
export * from './version-manager/index';
export * from './content-node-selector/index';
export * from './dialogs/index';
export * from './folder-directive/index';
export * from './content-metadata/index';
export * from './permission-manager/index';
export * from './content-node-share/index';
export * from './tree-view/index';
export * from './content.module';

View File

@@ -28,8 +28,8 @@ module.exports = function (config) {
{pattern: 'node_modules/pdfjs-dist/build/pdf.worker.js.map', included: false, served: true, watched: false}, {pattern: 'node_modules/pdfjs-dist/build/pdf.worker.js.map', included: false, served: true, watched: false},
{pattern: 'node_modules/pdfjs-dist/build/pdf.js.map', included: false, served: true, watched: false}, {pattern: 'node_modules/pdfjs-dist/build/pdf.js.map', included: false, served: true, watched: false},
{pattern: 'node_modules/pdfjs-dist/web/pdf_viewer.js.map', included: false, served: true, watched: false}, {pattern: 'node_modules/pdfjs-dist/web/pdf_viewer.js.map', included: false, served: true, watched: false},
{pattern: 'lib/content-services/i18n/**/en.json', included: false, served: true, watched: false}, {pattern: 'lib/content-services/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
{pattern: 'lib/content-services//assets/images/**/*.svg', included: false, served: true, watched: false}, {pattern: 'lib/content-services/src/lib/assets/images/**/*.svg', included: false, served: true, watched: false},
{pattern: 'lib/core/assets/images/ft_ic_folder.svg', included: false, served: true, watched: false}, {pattern: 'lib/core/assets/images/ft_ic_folder.svg', included: false, served: true, watched: false},
{pattern: 'lib/core/i18n/**/en.json', included: false, served: true, watched: false}, {pattern: 'lib/core/i18n/**/en.json', included: false, served: true, watched: false},
{pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false}, {pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false},
@@ -39,10 +39,10 @@ module.exports = function (config) {
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'], frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
proxies: { proxies: {
'/base/assets/': '/base/lib/content-services/assets/', '/base/assets/': '/base/lib/content-services/src/lib/assets/',
'/base/lib/content-services/assets/images/ft_ic_folder.svg': '/base/lib/core/assets/images/ft_ic_folder.svg', '/base/lib/content-services/assets/images/ft_ic_folder.svg': '/base/lib/core/assets/images/ft_ic_folder.svg',
'/assets/': '/base/lib/content-services/assets/', '/assets/': '/base/lib/content-services/src/lib/assets/',
'/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/i18n/en.json', '/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/src/lib/i18n/en.json',
'/assets/adf-core/i18n/en.json': '/base/lib/core/i18n/en.json', '/assets/adf-core/i18n/en.json': '/base/lib/core/i18n/en.json',
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/i18n/en.json', '/assets/adf-core/i18n/en-GB.json': '/base/lib/core/i18n/en.json',
'/app.config.json': '/base/lib/config/app.config.json', '/app.config.json': '/base/lib/config/app.config.json',

View File

@@ -1,12 +1,9 @@
{ {
"$schema": "./node_modules/ng-packagr/ng-package.schema.json", "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory" : "./ng_work", "dest": "../dist/content-services",
"src": "../content-services/",
"dest": "../dist/content-services/",
"lib": { "lib": {
"languageLevel": [ "dom", "es2016" ], "languageLevel": [ "dom", "es2017" ],
"comments" : "none", "entryFile": "src/public-api.ts",
"entryFile": "./public-api.ts",
"flatModuleFile": "adf-content-services", "flatModuleFile": "adf-content-services",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-api", "@alfresco/js-api": "@alfresco/js-api",

View File

@@ -1,18 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './index';

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -27,7 +27,7 @@ import { CoreModule } from '@alfresco/adf-core';
imports: [ imports: [
CommonModule, CommonModule,
MaterialModule, MaterialModule,
CoreModule.forChild() CoreModule
], ],
exports: [ exports: [
BreadcrumbComponent, BreadcrumbComponent,

View File

@@ -28,7 +28,7 @@ import { ContentMetadataCardComponent } from './components/content-metadata-card
CommonModule, CommonModule,
MaterialModule, MaterialModule,
FlexLayoutModule, FlexLayoutModule,
CoreModule.forChild() CoreModule
], ],
exports: [ exports: [
ContentMetadataComponent, ContentMetadataComponent,

View File

@@ -32,7 +32,7 @@ import { NameLocationCellComponent } from './name-location-cell/name-location-ce
imports: [ imports: [
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
CoreModule.forChild(), CoreModule,
CommonModule, CommonModule,
MaterialModule, MaterialModule,
SitesDropdownModule, SitesDropdownModule,

View File

@@ -18,8 +18,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NameLocationCellComponent } from './name-location-cell.component'; import { NameLocationCellComponent } from './name-location-cell.component';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { DataRow } from '@alfresco/adf-core'; import { DataRow, setupTestBed } from '@alfresco/adf-core';
import { setupTestBed } from '../../../core/testing/setupTestBed';
describe('NameLocationCellComponent', () => { describe('NameLocationCellComponent', () => {
let component: NameLocationCellComponent; let component: NameLocationCellComponent;

View File

@@ -27,8 +27,8 @@ import {
RenditionsService, RenditionsService,
AppConfigService AppConfigService
} from '@alfresco/adf-core'; } from '@alfresco/adf-core';
import { CoreTestingModule } from '../../core/testing/core.testing.module'; import { CoreModule, AppConfigServiceMock } from '@alfresco/adf-core';
import { AppConfigServiceMock } from '../../core/mock/app-config.service.mock';
import { ContentNodeShareModule } from './content-node-share.module'; import { ContentNodeShareModule } from './content-node-share.module';
import { ShareDialogComponent } from './content-node-share.dialog'; import { ShareDialogComponent } from './content-node-share.dialog';
import moment from 'moment-es6'; import moment from 'moment-es6';
@@ -49,7 +49,7 @@ describe('ShareDialogComponent', () => {
setupTestBed({ setupTestBed({
imports: [ imports: [
NoopAnimationsModule, NoopAnimationsModule,
CoreTestingModule, CoreModule.forRoot(),
ContentNodeShareModule ContentNodeShareModule
], ],
providers: [ providers: [

View File

@@ -24,7 +24,7 @@ import { NodeSharedDirective } from './content-node-share.directive';
@NgModule({ @NgModule({
imports: [ imports: [
CoreModule.forChild(), CoreModule,
CommonModule, CommonModule,
MaterialModule MaterialModule
], ],

View File

@@ -42,7 +42,7 @@ import { TreeViewModule } from './tree-view/tree-view.module';
@NgModule({ @NgModule({
imports: [ imports: [
CoreModule.forChild(), CoreModule,
SocialModule, SocialModule,
TagModule, TagModule,
CommonModule, CommonModule,
@@ -89,7 +89,7 @@ export class ContentModuleLazy {}
@NgModule({ @NgModule({
imports: [ imports: [
CoreModule.forChild(), CoreModule,
SocialModule, SocialModule,
TagModule, TagModule,
CommonModule, CommonModule,

View File

@@ -32,7 +32,7 @@ import { LibraryDialogComponent } from './library/library.dialog';
imports: [ imports: [
CommonModule, CommonModule,
MaterialModule, MaterialModule,
CoreModule.forChild(), CoreModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
MatMomentDatetimeModule, MatMomentDatetimeModule,

Some files were not shown because too many files have changed in this diff Show More