forked from deployd/deployd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.js
42 lines (34 loc) · 783 Bytes
/
make.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
require('shelljs/make');
var path = require('path');
target.all = function() {
target.jshint();
};
target.jshint = function() {
target.jshintLib();
target.jshintTest();
target.jshintDpdJs();
target.jshintCli();
};
function hint(pathName, fileName) {
var lastPath = process.cwd();
cd(pathName);
echo("Linting " + pathName + (fileName ? ("/" + fileName) : "") + "...");
exec('jshint ' + (fileName || '.') + " --extra-ext " + fileName);
echo();
cd(lastPath);
}
target.jshintLib = function() {
hint('lib');
};
target.jshintTest = function() {
hint('test');
hint('test-app');
};
target.jshintDpdJs = function() {
hint('clib', 'dpd.js');
};
target.jshintCli = function() {
cp('bin/dpd', 'bin/dpd.js');
hint('bin', 'dpd.js');
rm('bin/dpd.js');
};