aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-09 11:26:21 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-09-09 11:34:23 -0400
commit3b53b75160606610cc8f87404f89fc9e10441c4b (patch)
treeb20600c885ee70e7b9cc7c880fc7a2cf141b56a8 /build
parent2fe09ceaf9c261d8e7fbdf37a13b21bfd85da962 (diff)
downloadjquery-3b53b75160606610cc8f87404f89fc9e10441c4b.tar.gz
jquery-3b53b75160606610cc8f87404f89fc9e10441c4b.zip
Break jQuery.access out into its own module to separate it from core; Adjust CommonJS+AMD build support to include non-var dependencies. Convert modules with more than a few dependencies to use CJS+AMD syntax.
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 3992d284b..d8cea4c52 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -18,6 +18,9 @@ module.exports = function( grunt ) {
out: "dist/jquery.js",
// We have multiple minify steps
optimize: "none",
+ // Include dependencies loaded with require
+ findNestedDependencies: true,
+ // Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
startFile: "src/intro.js",
@@ -65,7 +68,7 @@ module.exports = function( grunt ) {
// Remove CommonJS-style require calls
// Keep an ending semicolon
contents = contents
- .replace( /\w+ = require\(\s*(")[\w\.\/]+\1\s*\)([,;])/g,
+ .replace( /(?:\s+\w+ = )?\s*require\(\s*(")[\w\.\/]+\1\s*\)([,;])/g,
function( all, quote, commaSemicolon ) {
return commaSemicolon === ";" ? ";" : "";
});