-
Notifications
You must be signed in to change notification settings - Fork 15
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
1 parent
27de5a9
commit 169fb0b
Showing
48 changed files
with
513 additions
and
280 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ | |
/**/node_modules | ||
/app | ||
/hooks | ||
/platforms | ||
/cloud |
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 @@ | ||
## 模块管理 |
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 @@ | ||
|
||
|
||
export default []; |
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,23 @@ | ||
import { NgModule } from 'nger-core'; | ||
import pages, { NgerInstallPage } from './template'; | ||
import incs from './inc'; | ||
import { NgerInstallTypeorm } from './typeorm'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
// 模板 | ||
...pages, | ||
// 控制器 | ||
...incs | ||
], | ||
providers: [], | ||
bootstrap: [ | ||
// 默认跳转页面 | ||
NgerInstallPage | ||
], | ||
imports: [ | ||
// 数据库 | ||
NgerInstallTypeorm | ||
] | ||
}) | ||
export class NgerInstallModule { } |
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 @@ | ||
{ | ||
"name": "nger-install" | ||
} |
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,26 @@ | ||
## 系统安装配置 | ||
|
||
## 源码 | ||
- [x] `addon` | ||
- [x] `ims-install` | ||
- [ ] `inc` 控制器,服务端 | ||
- [ ] `template` 模板 | ||
- [ ] `typeorm` 数据库 | ||
- [ ] `index.ts` 模块入口 | ||
- [ ] `package.json` 插件描述 | ||
|
||
## 编译后 | ||
- [x] `addon` | ||
- [x] `ims-install` | ||
- [ ] `pc` pc网站 | ||
- [ ] `admin` 管理 | ||
- [ ] `ttapp` 字节跳动 | ||
- [ ] `aliapp` 支付宝 | ||
- [ ] `weapp` 微信小程序 | ||
- [ ] `wechat` 微信浏览器 | ||
- [ ] `h5` 手机网站 | ||
- [ ] `ios` ios端 | ||
- [ ] `android` 安卓端 | ||
- [ ] `index.js` // 插件,可安装卸载更新 | ||
- [ ] `server.js` // 可独立运行,nger start addon/ims-install/server.js -p 4200 | ||
- [ ] `package.json` // 插件描述 |
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,7 @@ | ||
import { NgerInstallPage } from './install/index'; | ||
|
||
export default [ | ||
NgerInstallPage | ||
]; | ||
|
||
export { NgerInstallPage } |
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,36 @@ | ||
import { Page } from 'nger-core'; | ||
|
||
@Page({ | ||
path: '/install', | ||
title: 'nger系统安装', | ||
type: ['pc'] | ||
}) | ||
export class NgerInstallPage { | ||
|
||
render() { | ||
return <div> | ||
<h2 className="title">欢迎使用Nger平台</h2> | ||
<div className="step1"> | ||
<h4 className="title">管理员</h4> | ||
<input type="text" placeholder="站长用户名" /> | ||
<input type="text" placeholder="站长密码" /> | ||
</div> | ||
<div className="step2"> | ||
<h4 className="title">数据库配置</h4> | ||
<input type="text" placeholder="数据库地址" /> | ||
<input type="text" placeholder="数据库端口" /> | ||
<input type="text" placeholder="数据库用户名" /> | ||
<input type="text" placeholder="数据库密码" /> | ||
</div> | ||
<div className="step3"> | ||
<h4 className="title">挑选模块</h4> | ||
<ul> | ||
<li>商城</li> | ||
<li>社区</li> | ||
<li>bbs</li> | ||
<li>官网</li> | ||
</ul> | ||
</div> | ||
</div> | ||
} | ||
} |
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,4 @@ | ||
import { Entity } from 'nger-core' | ||
|
||
@Entity() | ||
export class NgerAddon { } |
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,4 @@ | ||
import { NgerAddon } from './addon' | ||
export default [ | ||
NgerAddon | ||
]; |
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,10 @@ | ||
import { Typeorm } from 'nger-core' | ||
import entities from './entities' | ||
@Typeorm({ | ||
entities: [ | ||
...entities | ||
], | ||
migrations: [], | ||
subscribers: [] | ||
}) | ||
export class NgerInstallTypeorm { } |
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Controller, Get } from 'nger-core' | ||
|
||
// 首页 | ||
@Controller({ | ||
path: '/api' | ||
}) | ||
export class NgerHome { | ||
export class NgerWelcomeController { | ||
@Get() | ||
getSystemInfo() { } | ||
getAllInstalled() { | ||
return []; | ||
} | ||
} |
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,10 @@ | ||
import { NgModule } from 'nger-core' | ||
import pages from './template' | ||
import { NgerWelcomeController } from './inc' | ||
@NgModule({ | ||
declarations: [ | ||
...pages, | ||
NgerWelcomeController | ||
] | ||
}) | ||
export class NgerWelcomeModule { } |
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,32 @@ | ||
import { Page } from 'nger-core'; | ||
|
||
@Page({ | ||
path: '/', | ||
type: ['admin'], | ||
title: '首页' | ||
}) | ||
export class NgerWelcomeHomePage { | ||
|
||
getLang() { | ||
// 把这个当成规范 | ||
return { | ||
[`客户1`]: { | ||
'install_title': '模块安装' | ||
}, | ||
[`客户2`]: { | ||
'install_title': 'Nger模块安装' | ||
} | ||
} | ||
} | ||
|
||
render() { | ||
return <div role="member"> | ||
<li>bbs</li> | ||
<li>商城</li> | ||
<li>官网</li> | ||
<li>博客</li> | ||
<button id="install">模块安装</button> | ||
</div> | ||
} | ||
} | ||
|
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,5 @@ | ||
import { NgerWelcomeHomePage } from './home' | ||
|
||
export default [ | ||
NgerWelcomeHomePage | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"lerna": "3.13.1", | ||
"packages": [ | ||
"dist/*" | ||
"packages/*" | ||
], | ||
"command": { | ||
"publish": { | ||
|
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 @@ | ||
# `nger-compiler-client` | ||
|
||
> 客户端编译 |
7 changes: 7 additions & 0 deletions
7
packages/nger-compiler-client/__tests__/nger-compiler-client.test.js
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,7 @@ | ||
'use strict'; | ||
|
||
const ngerCompilerClient = require('..'); | ||
|
||
describe('nger-compiler-client', () => { | ||
it('needs tests'); | ||
}); |
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,16 @@ | ||
import { NgModuleBootstrap, FileSystem, Logger } from 'nger-core' | ||
import compilerProviders, { NgerCompilerNgMetadata, NgerCompilerBabel, NgerCompilerBabelController } from 'nger-compiler' | ||
import { NgerCompilerClientBootstrap } from './bootstrap' | ||
import { NgerUtil } from 'nger-util' | ||
export default [ | ||
...compilerProviders, | ||
{ | ||
provide: NgModuleBootstrap, | ||
useClass: NgerCompilerClientBootstrap, | ||
multi: true, | ||
deps: [ | ||
NgerCompilerNgMetadata, FileSystem, NgerUtil, | ||
NgerCompilerBabel, Logger, NgerCompilerBabelController | ||
] | ||
}, | ||
] |
Oops, something went wrong.