Skip to content

Commit 7ddd42e

Browse files
committed
fix(commands): add generate, prepare, address, compile to the available command list.
1 parent 0553649 commit 7ddd42e

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

lib/config/commands.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ var affordances = {
3232
var orderedListOfCommands = [
3333
'start',
3434
'serve',
35+
'generate',
3536
'platform',
37+
'prepare',
3638
'run',
3739
'emulate',
3840
'build',
@@ -58,6 +60,8 @@ var orderedListOfCommands = [
5860
'link',
5961
'hooks',
6062
'state',
63+
'address',
64+
'compile',
6165
'docs'
6266
];
6367

spec/config/commands.spec.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
3+
var fs = require('fs');
4+
var path = require('path');
5+
var commands = require('../../lib/config/commands');
6+
7+
describe('orderedListOfCommands', function() {
8+
var listOfCommands = commands.orderedListOfCommands.slice(0);
9+
10+
it('should have a corresponding command every task in ionic folder', function() {
11+
var taskFileList = fs
12+
.readdirSync(path.join(__dirname, '../../lib/ionic'))
13+
.filter(function(file) {
14+
var stat = fs.statSync(path.join(__dirname, '../../lib/ionic', file));
15+
return !stat.isDirectory();
16+
})
17+
.map(function(file) {
18+
return file.replace('.js', '');
19+
})
20+
.sort();
21+
expect(taskFileList).toEqual(listOfCommands.sort());
22+
});
23+
});

0 commit comments

Comments
 (0)