-
Notifications
You must be signed in to change notification settings - Fork 58
/
Jakefile.js
43 lines (38 loc) · 1.18 KB
/
Jakefile.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
// This file is a node-jake file -- http://github.com/mde/node-jake
var util = require('util'),
exec = require('child_process').exec,
child;
var docTitle = 'node-graphviz'
var docFiles = 'lib/graphviz.js lib/deps/graph.js lib/deps/node.js lib/deps/edge.js'
var outputDocFile = 'documentation.json'
var docRibbon = 'http://github.com/glejeune/node-graphviz'
var docDesc = '[Node.js](http://nodejs.org) interface to the [GraphViz](http://graphviz.org) graphing tool'
desc('Generate node-graphviz documentation.');
task('doc', [], function () {
child = exec('dox -r ' + docRibbon + ' -d "' + docDesc + '" -t "' + docTitle + '" < ' + docFiles + ' > ' + outputDocFile,
function (error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
}
});
});
desc('Install');
task('install', [], function() {
child = exec('npm install .',
function(error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
}
}
);
});
desc('Publish');
task('publish', [], function() {
child = exec('npm publish .',
function(error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
}
}
);
});