added library project
This commit is contained in:
31
projects/nls-guilloche/karma.conf.js
Normal file
31
projects/nls-guilloche/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
|
||||
});
|
||||
};
|
||||
8
projects/nls-guilloche/ng-package.json
Normal file
8
projects/nls-guilloche/ng-package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/nls-guilloche",
|
||||
"deleteDestPath": false,
|
||||
"lib": {
|
||||
"entryFile": "src/public_api.ts"
|
||||
}
|
||||
}
|
||||
7
projects/nls-guilloche/ng-package.prod.json
Normal file
7
projects/nls-guilloche/ng-package.prod.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/lib",
|
||||
"lib": {
|
||||
"entryFile": "src/public_api.ts"
|
||||
}
|
||||
}
|
||||
33
projects/nls-guilloche/package.json
Normal file
33
projects/nls-guilloche/package.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "nls-guilloche",
|
||||
"version": "0.2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nextlevelshit/nls-ng6-d3js-guilloche"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "GPL-2.0-only",
|
||||
"url": "https://github.com/nextlevelshit/nls-ng6-d3js-guilloche/LICENSE.md"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"name": "Michael Czechowski",
|
||||
"email": "mail@dailysh.it",
|
||||
"url": "https://dailysh.it"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Erik Kimsey"
|
||||
},
|
||||
{
|
||||
"name": "Michael Czechowski",
|
||||
"email": "mail@dailysh.it",
|
||||
"url": "https://dailysh.it"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
||||
"@angular/core": "^6.0.0-rc.0 || ^6.0.0"
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
19
projects/nls-guilloche/src/lib/nls-guilloche.component.ts
Normal file
19
projects/nls-guilloche/src/lib/nls-guilloche.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
||||
10
projects/nls-guilloche/src/lib/nls-guilloche.module.ts
Normal file
10
projects/nls-guilloche/src/lib/nls-guilloche.module.ts
Normal 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 { }
|
||||
15
projects/nls-guilloche/src/lib/nls-guilloche.service.spec.ts
Normal file
15
projects/nls-guilloche/src/lib/nls-guilloche.service.spec.ts
Normal 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();
|
||||
}));
|
||||
});
|
||||
9
projects/nls-guilloche/src/lib/nls-guilloche.service.ts
Normal file
9
projects/nls-guilloche/src/lib/nls-guilloche.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NlsGuillocheService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
7
projects/nls-guilloche/src/public_api.ts
Normal file
7
projects/nls-guilloche/src/public_api.ts
Normal 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';
|
||||
22
projects/nls-guilloche/src/test.ts
Normal file
22
projects/nls-guilloche/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);
|
||||
33
projects/nls-guilloche/tsconfig.lib.json
Normal file
33
projects/nls-guilloche/tsconfig.lib.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"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,
|
||||
"flatModuleId": "AUTOGENERATED",
|
||||
"flatModuleOutFile": "AUTOGENERATED"
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
17
projects/nls-guilloche/tsconfig.spec.json
Normal file
17
projects/nls-guilloche/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
projects/nls-guilloche/tslint.json
Normal file
17
projects/nls-guilloche/tslint.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "../../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"lib",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"lib",
|
||||
"kebab-case"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user