diff options
author | Martin Naumann <martin@geekonaut.de> | 2015-10-12 16:02:25 +0200 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-10-12 18:17:12 +0300 |
commit | 0c34e688439713725d4215c63bc4cf876d8d0423 (patch) | |
tree | 73bf0beefc2250e93e3cc802ec62ee2395198bfa /build/tasks | |
parent | 03eaadb131df925d1072afd2496ee3b41d2f1fc6 (diff) | |
download | jquery-0c34e688439713725d4215c63bc4cf876d8d0423.tar.gz jquery-0c34e688439713725d4215c63bc4cf876d8d0423.zip |
Build: Fixed issue with base path that contain 'var'
Remove the cwd from the paths, so the regex doesn't kick in on "var"
Fixes gh-2450
Closes gh-2641
Diffstat (limited to 'build/tasks')
-rw-r--r-- | build/tasks/build.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js index 750bac5b7..74fa47fde 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -53,7 +53,7 @@ module.exports = function( grunt ) { var amdName; // Convert var modules - if ( /.\/var\//.test( path ) ) { + if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) { contents = contents .replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" ) .replace( rdefineEnd, "" ); |