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

@@ -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"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "nls-guilloche",
"version": "0.1.0",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "https://github.com/nextlevelshit/nls-ng6-d3js-guilloche"
@@ -37,10 +37,10 @@
},
"private": false,
"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/animations": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
@@ -52,9 +52,14 @@
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.0",
"@angular/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",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
@@ -69,7 +74,6 @@
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
"tslint": "~5.9.1"
}
}

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

View 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"
}
}

View File

@@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/lib",
"lib": {
"entryFile": "src/public_api.ts"
}
}

View 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"
}
}

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

View 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"
]
}

View 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"
]
}

View File

@@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@@ -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
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2.
@@ -22,6 +13,15 @@
* this program; if not, write to the Free Software Foundation, Inc., 51
* 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 {
display: flex;

View File

@@ -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
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2.

View File

@@ -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
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2.

View File

@@ -15,6 +15,11 @@
"lib": [
"es2017",
"dom"
]
],
"paths": {
"nls-guilloche": [
"dist/nls-guilloche"
]
}
}
}
}

600
yarn.lock

File diff suppressed because it is too large Load Diff