-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.js
45 lines (40 loc) · 1.06 KB
/
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
41
42
43
44
45
"use strict";
var stealTools = require("steal-tools");
var globalJS = require("steal-tools/lib/build/helpers/global").js;
var baseHelpers = require("steal-tools/lib/build/helpers/base");
var baseNormalize = globalJS.normalize();
stealTools.export({
steal: {
config: __dirname+"/package.json!npm"
},
options: {
//verbose: true
},
outputs: {
"+amd": {},
"global": {
modules: globalJS.modules(),
format: "global",
dest: globalJS.dest(),
useNormalizedDependencies: globalJS.useNormalizedDependencies(),
// makes sure can-set and can-connect are namespaced so there's no collision
normalize: function(depName, depLoad){
var parsed = baseHelpers.parseModuleName(depLoad.name);
var res;
if(parsed.packageName !== "can-connect" && parsed.packageName !== "can-set") {
res = baseNormalize.apply(this, arguments);
} else {
res = "fixture-"+parsed.packageName+"/"+parsed.modulePath
}
return res;
},
ignore: function(name, load){
return false
}
}
}
}).catch(function(e){
setTimeout(function(){
throw e;
},1);
});