blob: e0d43eb240a83c36bfea57d1083bb5c3be6e037f (
plain)
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
|
var Book = require('./book');
var Output = require('./output');
var NodeFS = require('./fs/node');
// Setup a Book for the arguments
function setupBook(args) {
var input = args[0] || process.cwd();
return new Book({
fs: new NodeFS(),
root: input
});
}
// Setup an Output for the arguments
function setupOutput(Out, args) {
return new Out(setupBook(args));
}
module.exports = {
Book: Book,
commands: [
{
name: 'install [book]',
description: 'install all plugins dependencies',
exec: function(args) {
var book = setupBook(args);
return book.config.load()
.then(function() {
return book.plugins.install();
})
.then(function(){
console.log('');
console.log(color.green('Done, without error'));
});
}
},
]
};
|