Skip to content

Commit e97fc31

Browse files
committed
v0.4.0
1 parent e8e2b9c commit e97fc31

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Scriptrjs",
33
"main": "scriptr.js",
4-
"version": "0.3.0",
4+
"version": "0.4.0",
55
"description": "Simple AMD Module Loader",
66
"moduleType": [
77
"AMD"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Scriptrjs",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"keywords": [
55
"loader",
66
"require",

scriptr.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,19 @@
208208
return true;
209209
};
210210
el.async = true;
211-
//el.src = filename + "?" + Date.now();
212-
el.src = filename;
211+
if (require.noCache){
212+
el.src = filename + "?" + Date.now();
213+
} else {
214+
el.src = filename;
215+
}
216+
213217
head.insertBefore(el, head.lastChild);
214218
};
215219

216220
Module._load = function (request, cb, parent) {
217221

222+
if (!cb){ cb = function(){}; }
223+
218224
if (isArray(request)) {
219225
var e = [], nested = function () {
220226
Array.prototype.push.apply( e, arguments );
@@ -279,6 +285,8 @@
279285
debug("PATH: Change Global Path From " + old + " to " + Global_Path);
280286
};
281287

288+
require.scriptr = true;
289+
require.noCache = false;
282290
require.debug = false;
283291
require.Register = function (obj) {
284292
for (var property in obj){

0 commit comments

Comments
 (0)