提交 992680e8 作者: 潘亚楠

init commit

上级 0cd69b55
......@@ -4,6 +4,7 @@
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Index File",
"type": "node",
......
......@@ -4,6 +4,15 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/commander": {
"version": "2.12.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/commander/-/commander-2.12.2.tgz",
"integrity": "sha1-GDBBojhC1CgUePpdI8XKeOb9CK4=",
"dev": true,
"requires": {
"commander": "*"
}
},
"@types/empower": {
"version": "1.2.30",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/empower/-/empower-1.2.30.tgz",
......@@ -286,6 +295,11 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"commander": {
"version": "4.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/commander/-/commander-4.0.1.tgz",
"integrity": "sha1-tnYicheFmTGC6Af0iDYz5kAbpTw="
},
"concat-map": {
"version": "0.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/concat-map/-/concat-map-0.0.1.tgz",
......
......@@ -22,6 +22,7 @@
"author": "panyanan",
"license": "ISC",
"devDependencies": {
"@types/commander": "^2.12.2",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.17",
"@types/power-assert": "^1.5.2",
......@@ -31,5 +32,8 @@
"power-assert": "^1.6.1",
"ts-node": "^8.5.4",
"typescript": "^3.7.3"
},
"dependencies": {
"commander": "^4.0.1"
}
}
#!/usr/bin/env node
import * as program from 'commander';
import { Templates } from '../config/template.config';
program
.command('create [projectName]')
.description('create command')
.option('-o, --open', 'Open browser')
.action((projectName, cmd) => {
console.log(projectName, cmd);
})
program.parse(process.argv)
/**
* @date 2019.12.16
* @author panyanan
* @information 框架模板配置文件
*/
export interface Repo {
url: string, // 仓库地址
user: string, // 用户名
password: string, // 用户密码
}
export interface Template {
name: string, // 模板名称
desc: string, // 模板描述
repo: Repo,
}
export const Templates: Template[] = [
{ name: 'vue2.0', desc: 'hello world', repo: { url: '', user: '', password: ''} },
// other todo
];
\ No newline at end of file
import * as http from 'http';
// debugger
function add (a:number, b: number): number {
return a + b;
}
add(1, 1);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论