Skip to content

Commit 55a59da

Browse files
committed
fixes build script and trailing common in model/list
1 parent d829cac commit 55a59da

File tree

2 files changed

+63
-38
lines changed

2 files changed

+63
-38
lines changed

buildAll.js

Lines changed: 62 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// load('jquery/build.js')
1+
// load('jquery/buildAll.js')
22

33
load('steal/rhino/rhino.js')
44

@@ -10,30 +10,77 @@ load('steal/rhino/rhino.js')
1010
steal('steal/build/pluginify','steal/build/apps','steal/build/scripts').then( function(s){
1111
var ignore = /\.\w+|test|generate|dist|qunit|fixtures|pages/
1212

13-
var plugins = [];
14-
13+
var plugins = [],
14+
/**
15+
* {"path/to/file.js" : ["file2/thing.js", ...]}
16+
*/
17+
files = {};
18+
1519
s.File('jquery').contents(function( name, type, current ) {
1620
if (type !== 'file' && !ignore.test(name)) {
1721
var folder = current+"/"+name;
18-
print(folder);
19-
plugins.push(folder);
20-
steal.File(folder).contents(arguments.callee, folder)
22+
if(readFile(folder+"/"+name+".js")){
23+
print(folder);
24+
plugins.push(folder);
25+
steal.File(folder).contents(arguments.callee, folder)
26+
}
27+
2128
//steal.File(path + "/" + (current ? current + "/" : "") + name).contents(arguments.callee, (current ? current + "/" : "") + name);
2229
}
2330
},"jquery");
2431

2532
// tell it to load all plugins into this page
26-
rhinoLoader = {
27-
callback: function( s ) {
28-
s.apply(s,plugins);
29-
}
30-
};
33+
3134

32-
steal.win().build_in_progress = true;
35+
//steal.win().build_in_progress = true;
3336
print(" LOADING APP ")
37+
steal.build.open('steal/rhino/blank.html', {
38+
startFiles: plugins
39+
}, function(opener){
40+
41+
opener.each('js', function(options, text, stl){
42+
print(options.rootSrc)
43+
var dependencies = files[options.rootSrc] = [];
44+
if(stl.dependencies){
45+
for (var d = 0; d < stl.dependencies.length; d++) {
46+
var depend = stl.dependencies[d];
47+
if (depend.options.rootSrc !== "jquery/jquery.js") {
48+
dependencies.push(depend.options.rootSrc);
49+
}
50+
}
51+
}
52+
})
53+
54+
s.File("jquery/dist/standalone").mkdirs();
55+
s.File("jquery/dist/standalone/dependencies.json").save($.toJSON(files));
56+
//get each file ...
57+
print("Creating jquery/dist/standalone/")
58+
var compressor = s.build.builders.scripts.compressors[ "localClosure"]()
59+
for(var path in files){
60+
if(path == "jquery/jquery.js"){
61+
continue;
62+
}
63+
var content = readFile(path);
64+
var funcContent = s.build.pluginify.getFunction(content);
65+
if(typeof funcContent == "undefined"){
66+
content = "";
67+
} else {
68+
content = "("+s.build.pluginify.getFunction(content)+")(jQuery);";
69+
}
70+
var out = path.replace(/\/\w+\.js/,"").replace(/\//g,".");
71+
content = s.build.builders.scripts.clean(content);
72+
print(" "+out+"");
73+
content = s.build.builders.scripts.clean(content);
74+
s.File("jquery/dist/standalone/"+out+".js").save(content);
75+
s.File("jquery/dist/standalone/"+out+".min.js").save(compressor(content));
76+
}
77+
78+
})
79+
80+
/*
3481
var pageSteal = steal.build.open("steal/rhino/empty.html").steal,
3582
steals = pageSteal.total,
36-
//hash of names to steals
83+
3784
files = {},
3885
depends = function(stl, steals){
3986
if(stl.dependencies){
@@ -75,31 +122,9 @@ steal('steal/build/pluginify','steal/build/apps','steal/build/scripts').then( fu
75122
}
76123
}
77124
}
78-
})
125+
})*/
126+
79127

80-
steal.File("jquery/dist/standalone").mkdir();
81-
steal.File("jquery/dist/standalone/dependencies.json").save($.toJSON(files));
82-
//get each file ...
83-
print("Creating jquery/dist/standalone/")
84-
var compressor = steal.build.builders.scripts.compressors[ "localClosure"]()
85-
for(var path in files){
86-
if(path == "jquery/jquery.js"){
87-
continue;
88-
}
89-
var content = readFile(path);
90-
var funcContent = s.build.pluginify.getFunction(content);
91-
if(typeof funcContent == "undefined"){
92-
content = "";
93-
} else {
94-
content = "("+s.build.pluginify.getFunction(content)+")(jQuery);";
95-
}
96-
var out = path.replace(/\/\w+\.js/,"").replace(/\//g,".");
97-
content = steal.build.builders.scripts.clean(content);
98-
print(" "+out+"");
99-
content = steal.build.builders.scripts.clean(content);
100-
s.File("jquery/dist/standalone/"+out+".js").save(content);
101-
s.File("jquery/dist/standalone/"+out+".min.js").save(compressor(content));
102-
}
103128

104129

105130
})

model/list/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ $.Class("jQuery.Model.List",{
208208
this[name] = ajaxMethods[name](this[name]);
209209
}
210210
}
211-
},
211+
}
212212
},
213213
/**
214214
* @Prototype

0 commit comments

Comments
 (0)