Skip to content

Commit

Permalink
Updated build
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed May 31, 2012
1 parent d5d0d22 commit 3fa411d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 42 deletions.
3 changes: 1 addition & 2 deletions build/amdify.js
Expand Up @@ -135,7 +135,6 @@ steal('steal/build', 'steal/build/pluginify', function(steal) {
var out = options.out;
print('Creating AMD modules for ' + source + " in " + options.out);
steal.File(out).mkdirs();
createModule(source, options.excludes || {}, options);
createModule(source, options.exclude || {}, options);
}

});
82 changes: 43 additions & 39 deletions build/make.js
@@ -1,63 +1,67 @@

load("steal/rhino/rhino.js");
steal('steal/build/pluginify', 'jquery/build/stealify.js', 'jquery/build/amdify.js', function() {
steal('steal/build/pluginify', 'jquery/build/stealify.js', 'jquery/build/amdify.js', 'jquery/build/extract.js',
function() {

var extend = steal.extend,
out = "jquery/dist/",
excludes = [ 'steal/dev',
"can/util/jquery/jquery.1.7.1.js",
"jquery/build/lib.js" ],
options = {
global: "jQuery",
skipCallbacks: true,
exclude : excludes.concat(["jquery/jquery.js"])
},
plugins = {
"jquery/dom/animate/animate.js" : "jquery.animate.js",
"jquery/dom/compare/compare.js" : "jquery.compare.js",
"jquery/dom/cookie/cookie.js" : "jquery.cookie.js",
"jquery/dom/dimensions/dimensions.js" : "jquery.dimensions.js",
"jquery/dom/form_params/form_params.js" : "jquery.form_params.js",
"jquery/dom/range/range.js" : "jquery.range.js",
"jquery/dom/selection/selection.js" : "jquery.selection.js",
"jquery/dom/styles/styles.js" : "jquery.styles.js",
"jquery/dom/within/within.js" : "jquery.within.js",
"jquery/event/default/default.js" : "jquery.event.default.js",
"jquery/event/destroyed/destroyed.js" : "jquery.event.destroyed.js",
"jquery/event/drag/drag.js" : "jquery.event.drag.js",
"jquery/event/drop/drop.js" : "jquery.event.drop.js",
"jquery/event/fastfix/fastfix.js" : "jquery.event.fastfix.js",
"jquery/event/hover/hover.js" : "jquery.event.hover.js",
"jquery/event/key/key.js" : "jquery.event.key.js",
"jquery/event/pause/pause.js" : "jquery.event.pause.js",
"jquery/event/resize/resize.js" : "jquery.event.resize.js",
"jquery/event/swipe/swipe.js" : "jquery.event.swipe.js"
};
"jquery/build/lib.js" ];

steal.File(out).mkdirs();

// Create full library
steal.build.pluginify('jquery/build/lib.js', extend({
out: out + "jquerypp.js"
}, options));
steal.build.pluginify('jquery/build/lib.js', {
out: out + "jquerypp.js",
skipCallbacks: true,
exclude : excludes.concat([
'jquery/dom/dom.js', 'jquery/event/event.js', 'jquery/jquery.js'
])
});

// Create each plugin
for(var file in plugins) {
steal.build.pluginify(file, extend({
out: out + plugins[file]
}, options));
}
// Create separate files
steal.build.extract({
"jquery/dom/animate/animate.js" : "jquery.animate.js",
"jquery/dom/compare/compare.js" : "jquery.compare.js",
"jquery/dom/cookie/cookie.js" : "jquery.cookie.js",
"jquery/dom/dimensions/dimensions.js" : "jquery.dimensions.js",
"jquery/dom/form_params/form_params.js" : "jquery.form_params.js",
"jquery/dom/range/range.js" : "jquery.range.js",
"jquery/dom/selection/selection.js" : "jquery.selection.js",
"jquery/dom/styles/styles.js" : "jquery.styles.js",
"jquery/dom/within/within.js" : "jquery.within.js",
"jquery/event/default/default.js" : "jquery.event.default.js",
"jquery/event/destroyed/destroyed.js" : "jquery.event.destroyed.js",
"jquery/event/drag/drag.js" : "jquery.event.drag.js",
"jquery/event/drop/drop.js" : "jquery.event.drop.js",
"jquery/event/fastfix/fastfix.js" : "jquery.event.fastfix.js",
"jquery/event/hover/hover.js" : "jquery.event.hover.js",
"jquery/event/key/key.js" : "jquery.event.key.js",
"jquery/event/pause/pause.js" : "jquery.event.pause.js",
"jquery/event/resize/resize.js" : "jquery.event.resize.js",
"jquery/event/swipe/swipe.js" : "jquery.event.swipe.js",
"jquery/event/livehack/livehack.js" : "jquery.event.livehack.js",
"jquery/lang/json/json.js" : "jquery.lang.json.js",
"jquery/lang/vector/vector.js" : "jquery.lang.vector.js"
}, {
skipCallbacks: true,
exclude : excludes.concat([
'jquery/dom/dom.js', 'jquery/event/event.js', 'jquery/jquery.js'
]),
out : out
});

// Make Steal distributable
steal.build.stealify('jquery/build/lib.js', {
out : out + 'steal/',
excludes : excludes
exclude : excludes
});

// Make AMD modules
steal.build.amdify('jquery/build/lib.js', {
out : out + 'amd/',
excludes : excludes.concat([
exclude : excludes.concat([
'jquery/dom/dom.js', 'jquery/event/event.js'
]),
map : { // steal file to CommonJS module name mappings
Expand Down
2 changes: 1 addition & 1 deletion build/stealify.js
Expand Up @@ -27,7 +27,7 @@ steal('steal/build', function(steal) {
skipCallbacks: true
}, function(opener){
opener.each(function(stl){
if(!inexcludes(options.excludes || [], stl.rootSrc)) {
if(!inexcludes(options.exclude || [], stl.rootSrc)) {
var file = steal.File(stl.rootSrc),
outPath = steal.File(out + file.dir()),
copyTo = outPath.path + '/' + file.filename();
Expand Down

0 comments on commit 3fa411d

Please sign in to comment.