added library project
This commit is contained in:
42
angular.json
42
angular.json
@@ -120,7 +120,47 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"nls-guilloche": {
|
||||||
|
"root": "projects/nls-guilloche",
|
||||||
|
"sourceRoot": "projects/nls-guilloche/src",
|
||||||
|
"projectType": "library",
|
||||||
|
"prefix": "lib",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": "projects/nls-guilloche/tsconfig.lib.json",
|
||||||
|
"project": "projects/nls-guilloche/ng-package.json"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"project": "projects/nls-guilloche/ng-package.prod.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "projects/nls-guilloche/src/test.ts",
|
||||||
|
"tsConfig": "projects/nls-guilloche/tsconfig.spec.json",
|
||||||
|
"karmaConfig": "projects/nls-guilloche/karma.conf.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"projects/nls-guilloche/tsconfig.lib.json",
|
||||||
|
"projects/nls-guilloche/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "nls-ng6-d3js-guilloche"
|
"defaultProject": "nls-ng6-d3js-guilloche"
|
||||||
}
|
}
|
||||||
18
package.json
18
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nls-guilloche",
|
"name": "nls-guilloche",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nextlevelshit/nls-ng6-d3js-guilloche"
|
"url": "https://github.com/nextlevelshit/nls-ng6-d3js-guilloche"
|
||||||
@@ -37,10 +37,10 @@
|
|||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^6.0.0",
|
|
||||||
"@angular/common": "^6.0.0",
|
"@angular/common": "^6.0.0",
|
||||||
"@angular/compiler": "^6.0.0",
|
|
||||||
"@angular/core": "^6.0.0",
|
"@angular/core": "^6.0.0",
|
||||||
|
"@angular/compiler": "^6.0.0",
|
||||||
|
"@angular/animations": "^6.0.0",
|
||||||
"@angular/forms": "^6.0.0",
|
"@angular/forms": "^6.0.0",
|
||||||
"@angular/http": "^6.0.0",
|
"@angular/http": "^6.0.0",
|
||||||
"@angular/platform-browser": "^6.0.0",
|
"@angular/platform-browser": "^6.0.0",
|
||||||
@@ -52,9 +52,14 @@
|
|||||||
"zone.js": "^0.8.26"
|
"zone.js": "^0.8.26"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.6.0",
|
|
||||||
"@angular/cli": "~6.0.0",
|
|
||||||
"@angular/compiler-cli": "^6.0.0",
|
"@angular/compiler-cli": "^6.0.0",
|
||||||
|
"@angular-devkit/build-ng-packagr": "~0.6.0",
|
||||||
|
"@angular-devkit/build-angular": "~0.6.0",
|
||||||
|
"ng-packagr": "^3.0.0-rc.2",
|
||||||
|
"tsickle": ">=0.25.5",
|
||||||
|
"tslib": "^1.7.1",
|
||||||
|
"typescript": "~2.7.2",
|
||||||
|
"@angular/cli": "~6.0.0",
|
||||||
"@angular/language-service": "^6.0.0",
|
"@angular/language-service": "^6.0.0",
|
||||||
"@types/jasmine": "~2.8.6",
|
"@types/jasmine": "~2.8.6",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
@@ -69,7 +74,6 @@
|
|||||||
"karma-jasmine-html-reporter": "^0.2.2",
|
"karma-jasmine-html-reporter": "^0.2.2",
|
||||||
"protractor": "~5.3.0",
|
"protractor": "~5.3.0",
|
||||||
"ts-node": "~5.0.1",
|
"ts-node": "~5.0.1",
|
||||||
"tslint": "~5.9.1",
|
"tslint": "~5.9.1"
|
||||||
"typescript": "~2.7.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,5 @@
|
|||||||
.canvas {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2018 Michael Czechowski
|
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation; version 2.
|
* Software Foundation; version 2.
|
||||||
@@ -22,6 +13,15 @@
|
|||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
.canvas {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (C) 2018 Michael Czechowski
|
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation; version 2.
|
* Software Foundation; version 2.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (C) 2018 Michael Czechowski
|
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation; version 2.
|
* Software Foundation; version 2.
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
"lib": [
|
"lib": [
|
||||||
"es2017",
|
"es2017",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
],
|
||||||
|
"paths": {
|
||||||
|
"nls-guilloche": [
|
||||||
|
"dist/nls-guilloche"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user