Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit 9565fe2

Browse files
committed
feat: Schematic for extracting libraries from projects
JIRA-Ticket: AV-27910
1 parent 528c54d commit 9565fe2

12 files changed

+264
-3
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avrios-schematics",
3-
"version": "2.5.0",
3+
"version": "2.6.0",
44
"description": "A blank schematics",
55
"scripts": {
66
"build": "tsc -p tsconfig.json"

src/collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
"description": "Create an Avrios library",
3131
"factory": "./library",
3232
"schema": "./library/schema.json"
33+
},
34+
"extract-app-libs": {
35+
"description": "Extract app libs from an Avrios project",
36+
"factory": "./extract-app-libs",
37+
"schema": "./extract-app-libs/schema.json"
3338
}
3439
}
3540
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { NgModule } from '@angular/core';
2+
import { <%= classify(name) %> } from './<%= dasherize(name) %>';
3+
4+
@NgModule({
5+
providers: [<%= classify(name) %>]
6+
})
7+
export class <%= classify(name) %>Module {}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { TestBed } from '@angular/core/testing';
2+
3+
import { <%= classify(name) %> } from './<%= dasherize(name) %>';
4+
5+
describe('<%= classify(name) %>', () => {
6+
let lib: <%= classify(name) %>;
7+
8+
beforeEach(() => {
9+
TestBed.configureTestingModule({});
10+
lib = TestBed.inject(<%= classify(name) %>);
11+
});
12+
13+
it('should be instantiated', () => {
14+
expect(lib).toBeTruthy();
15+
});
16+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export class <%= classify(name) %> {
2+
constructor() {
3+
}
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
export class <%= classify(name) %> {
3+
constructor() {
4+
}
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export class <%= classify(name) %> {
2+
constructor() {
3+
}
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export class <%= classify(name) %> {
2+
constructor() {
3+
}
4+
}

src/extract-app-libs/index.js

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

0 commit comments

Comments
 (0)