Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes build script and trailing common in model/list

  • Loading branch information...
commit 55a59da27c0528813cbdd55b240545dd4259f760 1 parent d829cac
@justinbmeyer justinbmeyer authored
Showing with 63 additions and 38 deletions.
  1. +62 −37 buildAll.js
  2. +1 −1  model/list/list.js
View
99 buildAll.js
@@ -1,4 +1,4 @@
-// load('jquery/build.js')
+// load('jquery/buildAll.js')
load('steal/rhino/rhino.js')
@@ -10,30 +10,77 @@ load('steal/rhino/rhino.js')
steal('steal/build/pluginify','steal/build/apps','steal/build/scripts').then( function(s){
var ignore = /\.\w+|test|generate|dist|qunit|fixtures|pages/
- var plugins = [];
-
+ var plugins = [],
+ /**
+ * {"path/to/file.js" : ["file2/thing.js", ...]}
+ */
+ files = {};
+
s.File('jquery').contents(function( name, type, current ) {
if (type !== 'file' && !ignore.test(name)) {
var folder = current+"/"+name;
- print(folder);
- plugins.push(folder);
- steal.File(folder).contents(arguments.callee, folder)
+ if(readFile(folder+"/"+name+".js")){
+ print(folder);
+ plugins.push(folder);
+ steal.File(folder).contents(arguments.callee, folder)
+ }
+
//steal.File(path + "/" + (current ? current + "/" : "") + name).contents(arguments.callee, (current ? current + "/" : "") + name);
}
},"jquery");
// tell it to load all plugins into this page
- rhinoLoader = {
- callback: function( s ) {
- s.apply(s,plugins);
- }
- };
+
- steal.win().build_in_progress = true;
+ //steal.win().build_in_progress = true;
print(" LOADING APP ")
+ steal.build.open('steal/rhino/blank.html', {
+ startFiles: plugins
+ }, function(opener){
+
+ opener.each('js', function(options, text, stl){
+ print(options.rootSrc)
+ var dependencies = files[options.rootSrc] = [];
+ if(stl.dependencies){
+ for (var d = 0; d < stl.dependencies.length; d++) {
+ var depend = stl.dependencies[d];
+ if (depend.options.rootSrc !== "jquery/jquery.js") {
+ dependencies.push(depend.options.rootSrc);
+ }
+ }
+ }
+ })
+
+ s.File("jquery/dist/standalone").mkdirs();
+ s.File("jquery/dist/standalone/dependencies.json").save($.toJSON(files));
+ //get each file ...
+ print("Creating jquery/dist/standalone/")
+ var compressor = s.build.builders.scripts.compressors[ "localClosure"]()
+ for(var path in files){
+ if(path == "jquery/jquery.js"){
+ continue;
+ }
+ var content = readFile(path);
+ var funcContent = s.build.pluginify.getFunction(content);
+ if(typeof funcContent == "undefined"){
+ content = "";
+ } else {
+ content = "("+s.build.pluginify.getFunction(content)+")(jQuery);";
+ }
+ var out = path.replace(/\/\w+\.js/,"").replace(/\//g,".");
+ content = s.build.builders.scripts.clean(content);
+ print(" "+out+"");
+ content = s.build.builders.scripts.clean(content);
+ s.File("jquery/dist/standalone/"+out+".js").save(content);
+ s.File("jquery/dist/standalone/"+out+".min.js").save(compressor(content));
+ }
+
+ })
+
+ /*
var pageSteal = steal.build.open("steal/rhino/empty.html").steal,
steals = pageSteal.total,
- //hash of names to steals
+
files = {},
depends = function(stl, steals){
if(stl.dependencies){
@@ -75,31 +122,9 @@ steal('steal/build/pluginify','steal/build/apps','steal/build/scripts').then( fu
}
}
}
- })
+ })*/
+
- steal.File("jquery/dist/standalone").mkdir();
- steal.File("jquery/dist/standalone/dependencies.json").save($.toJSON(files));
- //get each file ...
- print("Creating jquery/dist/standalone/")
- var compressor = steal.build.builders.scripts.compressors[ "localClosure"]()
- for(var path in files){
- if(path == "jquery/jquery.js"){
- continue;
- }
- var content = readFile(path);
- var funcContent = s.build.pluginify.getFunction(content);
- if(typeof funcContent == "undefined"){
- content = "";
- } else {
- content = "("+s.build.pluginify.getFunction(content)+")(jQuery);";
- }
- var out = path.replace(/\/\w+\.js/,"").replace(/\//g,".");
- content = steal.build.builders.scripts.clean(content);
- print(" "+out+"");
- content = steal.build.builders.scripts.clean(content);
- s.File("jquery/dist/standalone/"+out+".js").save(content);
- s.File("jquery/dist/standalone/"+out+".min.js").save(compressor(content));
- }
})
View
2  model/list/list.js
@@ -208,7 +208,7 @@ $.Class("jQuery.Model.List",{
this[name] = ajaxMethods[name](this[name]);
}
}
- },
+ }
},
/**
* @Prototype
Please sign in to comment.
Something went wrong with that request. Please try again.