Skip to content

Commit 8e9ab5d

Browse files
committed
fixed #8
1 parent ade8b8f commit 8e9ab5d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

bin/moa.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/usr/bin/env node
22
require('shelljs/global');
3-
3+
4+
var program = require('commander');
5+
6+
var version = require('../package.json').version
7+
program
8+
.version(version)
9+
.parse(process.argv);
10+
//
11+
// console.log('you ordered a pizza with:');
12+
// if (program.peppers) console.log(' - peppers');
13+
// if (program.pineapple) console.log(' - pineapple');
14+
// if (program.bbqSauce) console.log(' - bbq');
15+
// console.log(' - %s cheese', program.cheese);
16+
417
echo('Moajs HELP:');
518
echo('');
619
echo('moan: 【创建新项目】 moan new_project_name');

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "moajs",
3-
"version": "1.0.26",
3+
"version": "1.0.27",
44
"description": "Moajs is a full stack framework based expressjs、mongoose、bluebird、mocha.",
55
"main": "index.js",
66
"scripts": {
@@ -17,7 +17,7 @@
1717
"moad": "bin/moad.js",
1818
"moan": "bin/moan.js",
1919
"moas": "bin/moas.js",
20-
"km" : "bin/km.js",
20+
"km": "bin/km.js",
2121
"moalink": "bin/link.js"
2222
},
2323
"repository": {
@@ -33,6 +33,7 @@
3333
"dependencies": {
3434
"bluebird": "^2.9.27",
3535
"body-parser": "~1.12.4",
36+
"commander": "^2.8.1",
3637
"config": "^1.14.0",
3738
"connect-mongo": "^0.8.1",
3839
"cookie-parser": "~1.3.5",

0 commit comments

Comments
 (0)