-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildbug.js
More file actions
98 lines (79 loc) · 3.02 KB
/
buildbug.js
File metadata and controls
98 lines (79 loc) · 3.02 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* Copyright (c) 2014 airbug Inc. All rights reserved.
*
* All software, both binary and source contained in this work is the exclusive property
* of airbug Inc. Modification, decompilation, disassembly, or any other means of discovering
* the source code of this software is prohibited. This work is protected under the United
* States copyright law and other international copyright treaties and conventions.
*/
//-------------------------------------------------------------------------------
// BuildBug
//-------------------------------------------------------------------------------
var buildbug = require('buildbug');
//-------------------------------------------------------------------------------
// Simplify References
//-------------------------------------------------------------------------------
var buildProject = buildbug.buildProject;
var buildProperties = buildbug.buildProperties;
var buildScript = buildbug.buildScript;
var buildTarget = buildbug.buildTarget;
var enableModule = buildbug.enableModule;
var parallel = buildbug.parallel;
var series = buildbug.series;
var targetTask = buildbug.targetTask;
//-------------------------------------------------------------------------------
// Enable Modules
//-------------------------------------------------------------------------------
var lintbug = enableModule("lintbug");
//-------------------------------------------------------------------------------
// Build Properties
//-------------------------------------------------------------------------------
buildProperties({
lint: {
targetPaths: [
"."
],
ignorePatterns: [
".*\\.buildbug$",
".*\\.bugunit$",
".*\\.git$",
".*node_modules$",
".*external$"
]
}
});
//-------------------------------------------------------------------------------
// Build Targets
//-------------------------------------------------------------------------------
buildTarget('clean').buildFlow(
targetTask('clean')
);
buildTarget('local').buildFlow(
series([
targetTask('lint', {
properties: {
targetPaths: buildProject.getProperty("lint.targetPaths"),
ignores: buildProject.getProperty("lint.ignorePatterns"),
lintTasks: [
"cleanupExtraSpacingAtEndOfLines",
"ensureNewLineEnding",
"indentEqualSignsForPreClassVars",
"orderBugpackRequires",
"orderRequireAnnotations",
"updateCopyright"
]
}
})
])
).makeDefault();
//-------------------------------------------------------------------------------
// Build Scripts
//-------------------------------------------------------------------------------
buildScript({
dependencies: [
"bugcore",
"bugflow",
"bugfs"
],
script: "./lintbug.js"
});