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
@@ -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);
|
Reference in New Issue
Block a user