forked from jamesshore/lets_code_javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjakefile.js
63 lines (56 loc) · 1.62 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright (c) 2012 Titanium I.T. LLC. All rights reserved. See LICENSE.txt for details.
/*global desc, task, jake, fail, complete */
(function() {
"use strict";
desc("Build and test");
task("default", ["lint", "test"]);
desc("Lint everything");
task("lint", [], function() {
var lint = require("./build/lint/lint_runner.js");
var files = new jake.FileList();
files.include("**/*.js");
files.exclude("node_modules");
var options = nodeLintOptions();
var passed = lint.validateFileList(files.toArray(), options, {});
if (!passed) fail("Lint failed");
});
desc("Test everything");
task("test", [], function() {
var reporter = require("nodeunit").reporters["default"];
reporter.run(['src/server/_server_test.js'], null, function(failures) {
if (failures) fail("Tests failed");
complete();
});
}, {async: true});
desc("Integrate");
task("integrate", ["default"], function() {
console.log("1. Make sure 'git status' is clean.");
console.log("2. Build on the integration box.");
console.log(" a. Walk over to integration box.");
console.log(" b. 'git pull'");
console.log(" c. 'jake'");
console.log(" d. If jake fails, stop! Try again after fixing the issue.");
console.log("3. 'git checkout integration'");
console.log("4. 'git merge master --no-ff --log'");
console.log("5. 'git checkout master'");
});
function nodeLintOptions() {
return {
bitwise:true,
curly:false,
eqeqeq:true,
forin:true,
immed:true,
latedef:true,
newcap:true,
noarg:true,
noempty:true,
nonew:true,
regexp:true,
undef:true,
strict:true,
trailing:true,
node:true
};
}
}());