Skip to content

Commit

Permalink
Merge pull request #1421 from stealjs/load-bundles-false
Browse files Browse the repository at this point in the history
Adds load-bundles=false
  • Loading branch information
matthewp authored Jun 11, 2018
2 parents 31d4a94 + 2bdc9b6 commit 3930a58
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ addStealExtension(function (loader) {
return {
order: order,
set: function(val) {
this[prop] = !!val;
this[prop] = !!val && val !== "false";
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
return {
order: order,
set: function(val) {
this[prop] = !!val;
this[prop] = !!val && val !== "false";
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion steal-sans-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -6039,7 +6039,7 @@ addStealExtension(function (loader) {
return {
order: order,
set: function(val) {
this[prop] = !!val;
this[prop] = !!val && val !== "false";
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion steal-sans-promises.production.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion steal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7309,7 +7309,7 @@ addStealExtension(function (loader) {
return {
order: order,
set: function(val) {
this[prop] = !!val;
this[prop] = !!val && val !== "false";
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion steal.production.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions test/load-bundles/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var loader = require("@loader");

loader.config({
meta: {
"jquerty": {
exports: "jQuerty"
}
}
});
18 changes: 18 additions & 0 deletions test/load-bundles/dev.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
window.done = window.parent.done;
window.assert = window.parent.assert;
</script>
<script src="../../steal.js"
data-config="./config.js"
data-main="dev"
load-bundles="false"
data-env="production"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions test/load-bundles/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

module.exports = {};

if(typeof window !== "undefined" && window.assert) {
assert.ok(true, "Dev loaded fine");
done();
return {};
} else {
console.log("works!");
}
4 changes: 4 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ QUnit.test("loadBundles true with a different env loads the bundles", function(a
makeIframe("load-bundles/prod.html", assert);
});

QUnit.test("loadBundles can be disabled", function(assert) {
makeIframe("load-bundles/dev.html", assert);
})

QUnit.test("Using path's * qualifier", function(assert) {
writeIframe(
makeStealHTML({
Expand Down

0 comments on commit 3930a58

Please sign in to comment.