Skip to content

Commit 7575a2e

Browse files
committed
feat(project): generated the library
1 parent 586fb3a commit 7575a2e

17 files changed

+1185
-2
lines changed

package-lock.json

Lines changed: 936 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"devDependencies": {
2727
"@angular-devkit/build-angular": "~0.803.17",
28+
"@angular-devkit/build-ng-packagr": "~0.803.20",
2829
"@angular/cli": "~8.3.17",
2930
"@angular/compiler-cli": "~8.2.13",
3031
"@angular/language-service": "~8.2.13",
@@ -39,8 +40,10 @@
3940
"karma-coverage-istanbul-reporter": "~2.0.1",
4041
"karma-jasmine": "~2.0.1",
4142
"karma-jasmine-html-reporter": "^1.4.0",
43+
"ng-packagr": "^5.4.0",
4244
"protractor": "~5.4.0",
4345
"ts-node": "~7.0.0",
46+
"tsickle": "^0.37.0",
4447
"tslint": "~5.15.0",
4548
"typescript": "~3.5.3"
4649
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Loaders
2+
3+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4+
5+
## Code scaffolding
6+
7+
Run `ng generate component component-name --project loaders` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project loaders`.
8+
> Note: Don't forget to add `--project loaders` or else it will be added to the default project in your `angular.json` file.
9+
10+
## Build
11+
12+
Run `ng build loaders` to build the project. The build artifacts will be stored in the `dist/` directory.
13+
14+
## Publishing
15+
16+
After building your library with `ng build loaders`, go to the dist folder `cd dist/loaders` and run `npm publish`.
17+
18+
## Running unit tests
19+
20+
Run `ng test loaders` to execute the unit tests via [Karma](https://karma-runner.github.io).
21+
22+
## Further help
23+
24+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, '../../../coverage/angular-material-extensions/loaders'),
20+
reports: ['html', 'lcovonly', 'text-summary'],
21+
fixWebpackSourcePaths: true
22+
},
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: true,
28+
browsers: ['Chrome'],
29+
singleRun: false,
30+
restartOnFileChange: true
31+
});
32+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../../dist/angular-material-extensions/loaders",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
}
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "@angular-material-extensions/loaders",
3+
"version": "0.0.1",
4+
"peerDependencies": {
5+
"@angular/common": "^8.2.14",
6+
"@angular/core": "^8.2.14"
7+
}
8+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { LoadersComponent } from './loaders.component';
4+
5+
describe('LoadersComponent', () => {
6+
let component: LoadersComponent;
7+
let fixture: ComponentFixture<LoadersComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ LoadersComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(LoadersComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'lib-loaders',
5+
template: `
6+
<p>
7+
loaders works!
8+
</p>
9+
`,
10+
styles: []
11+
})
12+
export class LoadersComponent implements OnInit {
13+
14+
constructor() { }
15+
16+
ngOnInit() {
17+
}
18+
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { NgModule } from '@angular/core';
2+
import { LoadersComponent } from './loaders.component';
3+
4+
5+
6+
@NgModule({
7+
declarations: [LoadersComponent],
8+
imports: [
9+
],
10+
exports: [LoadersComponent]
11+
})
12+
export class LoadersModule { }
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { TestBed } from '@angular/core/testing';
2+
3+
import { LoadersService } from './loaders.service';
4+
5+
describe('LoadersService', () => {
6+
beforeEach(() => TestBed.configureTestingModule({}));
7+
8+
it('should be created', () => {
9+
const service: LoadersService = TestBed.get(LoadersService);
10+
expect(service).toBeTruthy();
11+
});
12+
});

0 commit comments

Comments
 (0)