-
Notifications
You must be signed in to change notification settings - Fork 380
/
build.js
40 lines (37 loc) · 829 Bytes
/
build.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
var stealTools = require("steal-tools");
var npmUtils =require("steal/ext/npm-utils");
var isNpm = npmUtils.moduleName.isNpm;
var parseModuleName = npmUtils.moduleName.parse;
stealTools.export({
steal: {
config: __dirname + "/package.json!npm",
"main": "global"
},
outputs: {
"+amd": {},
"+cjs": {},
"global": {
modules: ["global"],
dest: __dirname + "/dist/funcunit.js",
format: "global",
normalize: function(depName) {
if(isNpm(depName)) {
var parsed = parseModuleName(depName);
if(parsed.packageName === "jquery") {
depName = parsed.packageName;
} else {
depName = parsed.packageName + "/" + parsed.modulePath;
}
}
return depName;
},
exports: {
"jquery": "jQuery"
}
}
}
}).catch(function(e){
setTimeout(function(){
throw e;
},1);
});