2
0

added library project

This commit is contained in:
2018-06-27 19:27:49 +02:00
parent 56a8142fbf
commit 86eab2066e
21 changed files with 909 additions and 37 deletions

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NlsGuillocheComponent } from './nls-guilloche.component';
describe('NlsGuillocheComponent', () => {
let component: NlsGuillocheComponent;
let fixture: ComponentFixture<NlsGuillocheComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NlsGuillocheComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NlsGuillocheComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,19 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'lib-nls-guilloche',
template: `
<p>
nls-guilloche works!
</p>
`,
styles: []
})
export class NlsGuillocheComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';
import { NlsGuillocheComponent } from './nls-guilloche.component';
@NgModule({
imports: [
],
declarations: [NlsGuillocheComponent],
exports: [NlsGuillocheComponent]
})
export class NlsGuillocheModule { }

View File

@@ -0,0 +1,15 @@
import { TestBed, inject } from '@angular/core/testing';
import { NlsGuillocheService } from './nls-guilloche.service';
describe('NlsGuillocheService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [NlsGuillocheService]
});
});
it('should be created', inject([NlsGuillocheService], (service: NlsGuillocheService) => {
expect(service).toBeTruthy();
}));
});

View File

@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class NlsGuillocheService {
constructor() { }
}

View File

@@ -0,0 +1,7 @@
/*
* Public API Surface of nls-guilloche
*/
export * from './lib/nls-guilloche.service';
export * from './lib/nls-guilloche.component';
export * from './lib/nls-guilloche.module';

View 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);