-
Notifications
You must be signed in to change notification settings - Fork 8
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
yuanxueran
committed
Apr 20, 2021
1 parent
2367f2b
commit 876dc3b
Showing
42 changed files
with
797 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# hoth-molecule | ||
|
||
### Install and Run | ||
|
||
Using NPM: | ||
|
||
```sh | ||
$ npm install | ||
$ npm run dev | ||
``` | ||
|
||
Using Yarn: | ||
|
||
```sh | ||
$ yarn | ||
$ yarn dev | ||
``` |
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 @@ | ||
{ | ||
"watch": ["*.ts", "*.json"], | ||
"ignore": ["*.test.ts", "*.spec.ts", "node_modules/*", "*.d.ts"], | ||
"ext": "ts,js,tpl", | ||
"exec": "NODE_ENV=development npm run build && NODE_ENV=development hoth start --app-dir='dist' --app-name='hoth-molecule' --app-prefix='/hoth-molecule'", | ||
"legacyWatch": true | ||
} |
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,58 @@ | ||
{ | ||
"name": "@baidu/molecule-myapp", | ||
"version": "1.0.0", | ||
"description": "molecule app", | ||
"main": "dist/app.js", | ||
"private": true, | ||
"scripts": { | ||
"lint-staged": "lint-staged", | ||
"lint": "eslint src", | ||
"dev": "nodemon", | ||
"build-serve": "tsc --build ./serve/tsconfig.json && gulp -f ./serve/gulpfile.esm.js", | ||
"build-client": "tsc --build ./src/tsconfig.node.json", | ||
"build": "npm run build-serve && npm run build-client" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "ssh://git@icode.baidu.com:8235/baidu/myapp-fe/node-ui" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"lint-staged": { | ||
"**/*.ts": [ | ||
"eslint" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@babel/eslint-plugin": "^7.12.13", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@ecomfe/eslint-config": "^7.0.0", | ||
"@hoth/cli": "^1.0.2", | ||
"@tsconfig/node12": "^1.0.7", | ||
"@types/node": "^14.14.22", | ||
"@typescript-eslint/eslint-plugin": "^4.14.2", | ||
"@typescript-eslint/parser": "^4.14.2", | ||
"eslint": "^7.19.0", | ||
"esm": "^3.2.25", | ||
"fastify": "^3.11.0", | ||
"gulp": "^4.0.2", | ||
"husky": "^4.3.8", | ||
"lerna": "^3.22.1", | ||
"lint-staged": "^10.5.4", | ||
"nodemon": "^2.0.7", | ||
"source-map-support": "^0.5.19", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
"dependencies": { | ||
"nunjucks": "^3.2.3", | ||
"point-of-view": "^4.14.0" | ||
} | ||
} |
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 @@ | ||
# nodeui 服务器端逻辑 |
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 {FastifyInstance} from 'fastify'; | ||
export default async function main(fastify: FastifyInstance) { | ||
return fastify; | ||
} |
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,14 @@ | ||
{ | ||
"controllers": [ | ||
{ | ||
"name": "index", | ||
"ctrlPath": "view/main/index", | ||
"httptype": "get" | ||
}, | ||
{ | ||
"name": "test", | ||
"ctrlPath": "view/main/index", | ||
"httptype": "post" | ||
} | ||
] | ||
} |
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 {src, dest, series} from 'gulp'; | ||
|
||
function copyAssets() { | ||
return src('./config/*').pipe(dest('../dist/config')); | ||
} | ||
|
||
export default series(copyAssets); |
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,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2019", | ||
"module": "commonjs", | ||
"moduleResolution": "Node", | ||
"esModuleInterop": true, | ||
"rootDir": "./", | ||
"outDir": "../dist", | ||
"declaration": false, | ||
"composite": false | ||
} | ||
} |
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 @@ | ||
export class Controller { | ||
render(data: any) { | ||
return `${data.content}`; | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es2019", | ||
"module": "commonjs", | ||
"moduleResolution": "Node", | ||
"rootDir": "./", | ||
"outDir": "../dist/view" | ||
} | ||
} |
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,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"importHelpers": true, | ||
"esModuleInterop": true, | ||
"sourceMap": false, | ||
"declaration": false, | ||
"rootDir": "./", | ||
"composite": false | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
declare module 'config'; | ||
declare module 'config'; | ||
declare module '@hoth/molecule'; |
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
Oops, something went wrong.