mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3538] Alfresco Process Service Cloud - new package with CLI (#3872)
* [ADF-3538] start creating new folder for cloud components * [ADF-3538] added new package to the script and the builds * [ADF-3538] added some more changes to scripts * [ADF-3538] - starting the new package * change index * fix package * Fix module structure with Cli * add basic structure * Create a library with angular cli * Add a cloud component as example * Skip the scss style * add the import scss * remove useless codes * Add i18n example * remove useless code * Simplify the hello component Fix the wrong path * Fix process service cloud path * Download process-service-cloud from the CS
This commit is contained in:
committed by
Eugenio Romano
parent
5378df9425
commit
0ecb6c13ec
18
lib/process-services-cloud/index.ts
Normal file
18
lib/process-services-cloud/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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 './src/public_api';
|
31
lib/process-services-cloud/karma.conf.js
Normal file
31
lib/process-services-cloud/karma.conf.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage'),
|
||||
reports: ['html', 'lcovonly'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false
|
||||
});
|
||||
};
|
12
lib/process-services-cloud/ng-package.json
Normal file
12
lib/process-services-cloud/ng-package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../dist/process-services-cloud",
|
||||
"lib": {
|
||||
"languageLevel": ["dom", "es2017"],
|
||||
"entryFile": "src/public_api.ts",
|
||||
"flatModuleFile": "adf-process-services-cloud",
|
||||
"umdModuleIds": {
|
||||
"alfresco-js-api": "alfresco-js-api"
|
||||
}
|
||||
}
|
||||
}
|
19
lib/process-services-cloud/package.json
Normal file
19
lib/process-services-cloud/package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@alfresco/adf-process-services-cloud",
|
||||
"description": "Alfresco ADF process services cloud",
|
||||
"version": "1.0.0",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-process-services-cloud.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
||||
"@angular/core": "^6.0.0-rc.0 || ^6.0.0",
|
||||
"alfresco-js-api": "2.6.0"
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
hello cloud world!
|
||||
</p>
|
||||
|
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HelloComponent } from './hello.component';
|
||||
|
||||
describe('HelloComponent', () => {
|
||||
let component: HelloComponent;
|
||||
let fixture: ComponentFixture<HelloComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HelloComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HelloComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
lib/process-services-cloud/src/lib/hello/hello.component.ts
Normal file
15
lib/process-services-cloud/src/lib/hello/hello.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-hello',
|
||||
templateUrl: './hello.component.html',
|
||||
styleUrls: ['./hello.component.css']
|
||||
})
|
||||
export class HelloComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
import { HelloModule } from './hello.module';
|
||||
|
||||
describe('HelloModule', () => {
|
||||
let helloModule: HelloModule;
|
||||
|
||||
beforeEach(() => {
|
||||
helloModule = new HelloModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(helloModule).toBeTruthy();
|
||||
});
|
||||
});
|
13
lib/process-services-cloud/src/lib/hello/hello.module.ts
Normal file
13
lib/process-services-cloud/src/lib/hello/hello.module.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HelloComponent } from './hello.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule
|
||||
],
|
||||
declarations: [HelloComponent],
|
||||
exports: [HelloComponent]
|
||||
})
|
||||
export class HelloModule { }
|
3
lib/process-services-cloud/src/lib/i18n/en.json
Normal file
3
lib/process-services-cloud/src/lib/i18n/en.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"TEST_KEY": "MY TEST"
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HelloModule } from './hello/hello.module';
|
||||
import { TRANSLATION_PROVIDER } from '@alfresco/adf-core';
|
||||
@NgModule({
|
||||
imports: [
|
||||
HelloModule
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: TRANSLATION_PROVIDER,
|
||||
multi: true,
|
||||
useValue: {
|
||||
name: 'adf-process-services-cloud',
|
||||
source: 'assets/adf-process-services-cloud'
|
||||
}
|
||||
}
|
||||
],
|
||||
declarations: [],
|
||||
exports: [HelloModule]
|
||||
})
|
||||
export class ProcessServicesCloudModule { }
|
2
lib/process-services-cloud/src/lib/styles/_index.scss
Normal file
2
lib/process-services-cloud/src/lib/styles/_index.scss
Normal file
@@ -0,0 +1,2 @@
|
||||
@mixin adf-process-services-cloud-theme($theme) {
|
||||
}
|
19
lib/process-services-cloud/src/public_api.ts
Normal file
19
lib/process-services-cloud/src/public_api.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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 './lib/process-services-cloud.module';
|
||||
export * from './lib/hello/hello.module';
|
22
lib/process-services-cloud/src/test.ts
Normal file
22
lib/process-services-cloud/src/test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'core-js/es7/reflect';
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
32
lib/process-services-cloud/tsconfig.lib.json
Normal file
32
lib/process-services-cloud/tsconfig.lib.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"target": "es2015",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"types": [],
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
17
lib/process-services-cloud/tsconfig.spec.json
Normal file
17
lib/process-services-cloud/tsconfig.spec.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
17
lib/process-services-cloud/tslint.json
Normal file
17
lib/process-services-cloud/tslint.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "../../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"adf-cloud",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"adf-cloud",
|
||||
"kebab-case"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user