From 3b53b75160606610cc8f87404f89fc9e10441c4b Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 9 Sep 2013 11:26:21 -0400 Subject: 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. --- build/tasks/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build/tasks') 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 === ";" ? ";" : ""; }); -- cgit v1.2.3