Skip to content

Commit

Permalink
feat: demo library
Browse files Browse the repository at this point in the history
  • Loading branch information
dherges committed May 19, 2017
1 parent 91880b9 commit 2cb2066
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 1 deletion.
1 change: 0 additions & 1 deletion foo/public_api.ts

This file was deleted.

4 changes: 4 additions & 0 deletions sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Best library in town!
=====================

> Yep, for sure.
12 changes: 12 additions & 0 deletions sample/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@foo/bar",
"version": "1.0.0-alpha.0",
"repository": "https://github.com/dherges/ng-packagr.git",
"author": "david <david@spektrakel.de>",
"license": "MIT",
"private": true,
"peerDependencies": {
"@angular/core": "^4.1.2",
"@angular/common": "^4.1.2"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions sample/src/foo/foo.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';

@Component({
selector: 'foo-component',
template: 'foo'
})
export class FooComponent {

constructor(
private http: Http
) {}

doSomething() {

this.http.get('/foo/bar')
.map((res: Response) => res.ok)
.subscribe();

}

}
2 changes: 2 additions & 0 deletions sample/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './bar';
export * from './foo/foo.component';
41 changes: 41 additions & 0 deletions sample/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"flatModuleId": "@foo/bar",
"flatModuleOutFile": "index",
"skipTemplateCodegen": true,
"strictMetadataEmit": true
},
"buildOnSave": false,
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"outDir": "",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"skipLibCheck": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"dom",
"es2015"
]
},
"exclude": [
"node_modules",
"dist",
"**/*.ngfactory.ts",
"**/*.shim.ts",
"**/*.spec.ts"
],
"files": [
"src/public_api.ts"
]
}

0 comments on commit 2cb2066

Please sign in to comment.