Skip to content

Commit 32980ee

Browse files
LibCommon restructured, Script build:libs added
1 parent d9b5f14 commit 32980ee

File tree

10 files changed

+14
-8
lines changed

10 files changed

+14
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"ng": "ng",
66
"start": "ng serve",
77
"build": "ng build",
8+
"build:libs": "ng build lib-common",
89
"test": "ng test",
910
"lint": "ng lint",
1011
"e2e": "ng e2e"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lib-common/lib-common.component';

projects/lib-common/src/lib/lib-common.component.ts renamed to projects/lib-common/src/component/lib-common/lib-common.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, OnInit } from '@angular/core';
22

33
@Component({
4-
selector: 'lib-lib-common',
4+
selector: 'lib-common',
55
template: `
66
<p>
77
lib-common works!
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NgModule } from '@angular/core';
2-
import { LibCommonComponent } from './lib-common.component';
2+
import { LibCommonComponent } from './component/lib-common/lib-common.component';
33

44

55

@@ -9,4 +9,4 @@ import { LibCommonComponent } from './lib-common.component';
99
],
1010
exports: [LibCommonComponent]
1111
})
12-
export class LibCommonModule { }
12+
export class CommonModule { }

projects/lib-common/src/public-api.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Public API Surface of lib-common
33
*/
44

5-
export * from './lib/lib-common.service';
6-
export * from './lib/lib-common.component';
7-
export * from './lib/lib-common.module';
5+
export * from './component';
6+
export * from './lib-common.module';
7+
export * from './service';
8+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lib-common/lib-common.service';

src/app/app.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
import { BrowserModule } from '@angular/platform-browser';
21
import { NgModule } from '@angular/core';
3-
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { CommonModule } from 'lib-common';
44
import { AppRoutingModule } from './app-routing.module';
55
import { AppComponent } from './app.component';
66

7+
78
@NgModule({
89
declarations: [
910
AppComponent
1011
],
1112
imports: [
1213
BrowserModule,
14+
CommonModule,
1315
AppRoutingModule
1416
],
1517
providers: [],

0 commit comments

Comments
 (0)