-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.js
57 lines (50 loc) · 1.46 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
exports.execute = function () {
var parser = require('nomnom');
var pjson = require('./package.json');
// Get name of binary
parser.script( Object.keys( pjson.bin )[0] );
// Create Command
parser.command('create')
.option('name', {
position: 1,
required: true,
help: 'Name of your Meteor App'
})
.option('blank', {
abbr: 'b',
flag: true,
help: "Create a blank app without any example code"
})
/*.option('profile', {
abbr: 'p',
help: "Choose between default (javascript), es6 (harmony) or coffee (coffeescript) profiles"
}) */
.callback(require('./commands/create'))
.help('Creates a new app with the Meteor Boilerplate')
;
// Init Command
parser.command('init')
.callback(require('./commands/init'))
.help('Initialize app for scaffolding (execute from within the app)')
;
// Generate Command
parser.command('generate')
.option('name', {
position: 1,
help: 'Name of templates to generate, see settings.json'
})
.callback(require('./commands/generate'))
.help('Scaffolds templates (execute from within the app)')
;
// Reset command
parser.command('reset')
.callback(require('./commands/reset'))
.help('Reset files in the app (execute from within the app)')
;
// Set Profile command
parser.command('set-profile')
.callback(require('./commands/setProfile.js'))
.help('Set a new scaffolding profile')
;
parser.parse();
};