This repository has been archived by the owner on Sep 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
181 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# <%= scope %>/<%= packageName %> | ||
|
||
Generated by [generator-console-package](https://github.com/easyops-cn/generator-console-package) v<%= generatorVersion %> | ||
|
||
## Develop | ||
|
||
``` | ||
# 1. 开启监听构建 | ||
cd ~/<%= repository %> | ||
lerna run start --scope=<%= scope %>/<%= packageName %> | ||
# 2. 创建 link | ||
cd <%= subPackagePath %>/<%= packageName %> | ||
yarn link | ||
# 3. 使用 link | ||
cd ~/Console-W | ||
yarn link <%= scope %>/<%= packageName %> | ||
``` | ||
|
||
## publish | ||
|
||
``` | ||
lerna version | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "<%= scope %>/<%= packageName %>", | ||
"version": "0.0.0", | ||
"main": "dist/main.js", | ||
"repository": "https://git.easyops.local/anyclouds/<%= repository %>", | ||
"license": "UNLICENSED", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"start": "npm run build:dev -- --watch", | ||
"build:dev": "NODE_ENV=development webpack --mode development --config ../../webpack.config.js", | ||
"prebuild": "rimraf dist", | ||
"prestart": "rimraf dist", | ||
"build": "NODE_ENV=production webpack --mode production --config ../../webpack.config.js", | ||
"prepublishOnly": "npm test && npm run build" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": "7.1.4", | ||
"@angular/core": "7.1.4", | ||
"@angular/forms": "7.1.4", | ||
"@angular/platform-browser": "7.1.4", | ||
"@angular/router": "7.1.4", | ||
"@easyops/console-plugin-core": "^5.0.0", | ||
"@easyops/console-vendors": "^11.0.3", | ||
"@uirouter/angular": "2.0.0", | ||
"@uirouter/core": "5.0.19", | ||
"rxjs": "^6.4.0", | ||
"zone.js": "~0.8.26" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
generators/app/templates/brick/src/components/template.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
<%= componentName %> works! | ||
</p> |
Empty file.
24 changes: 24 additions & 0 deletions
24
generators/app/templates/brick/src/components/template.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { async, ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { <%= componentClassName %> } from "./<%= componentName %>.component"; | ||
|
||
describe("<%= componentClassName %>", () => { | ||
let component: <%= componentClassName %>; | ||
let fixture: ComponentFixture<<%= componentClassName %>>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ <%= componentClassName %> ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(<%= componentClassName %>); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
generators/app/templates/brick/src/components/template.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: "<%= componentName %>", | ||
templateUrl: "./<%= componentName %>.component.html", | ||
styleUrls: ["./<%= componentName %>.component.scss"] | ||
}) | ||
export class <%= componentClassName %> implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from "@angular/core"; | ||
import { CommonModule } from "@angular/common"; | ||
|
||
import { <%= componentClassName %> } from "./components/<%= componentName %>.component"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule | ||
], | ||
declarations: [<%= componentClassName %>], | ||
entryComponents: [<%= componentClassName %>] | ||
}) | ||
export class <%= moduleName %> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { platformBrick } from "@easyops/console-plugin-core"; | ||
import { <%= moduleName %> } from "./index.module"; | ||
|
||
platformBrick("<%= scope %>/<%= packageName %>").bootstrapModule( | ||
<%= moduleName %> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": [ | ||
"." | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.