mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 14:05:00 -05:00
Build: Fixed issue with base path that contain 'var'
Remove the cwd from the paths, so the regex doesn't kick in on "var"
Cherry-picked from 0c34e68843
Fixes gh-2450
Closes gh-2641
This commit is contained in:
committed by
Oleg Gaidarenko
parent
ef6cd83ab0
commit
4e3f971866
@@ -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, "" );
|
||||
|
||||
Reference in New Issue
Block a user