forked from ionic-team/ionic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.js
More file actions
41 lines (27 loc) · 802 Bytes
/
help.js
File metadata and controls
41 lines (27 loc) · 802 Bytes
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
var IonicProject = require('./project'),
IonicTask = require('./task').IonicTask,
IonicStats = require('./stats').IonicStats;
argv = require('optimist').argv,
Task = require('./task').Task;
var IonicTask = function() {};
IonicTask.prototype = new Task();
IonicTask.prototype.run = function(ionic) {
// var self = this;
// self.ionic = ionic;
var command = argv._[1] ? argv._[1] : '';
var task = ionic.getTaskWithName(command);
if(command == '') {
ionic.printHelpLines();
return;
}
else if (!task) {
console.log('Command not found.'.red.bold)
return
}
ionic.printIonic();
process.stderr.write('\n=======================\n');
ionic.printUsage(task);
process.stderr.write('\n\n');
// IonicStats.t();
}
exports.IonicTask = IonicTask;