Permalink
Browse files

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
  • Loading branch information...
Martin Naumann authored and markelog committed Oct 12, 2015
1 parent 03eaadb commit 0c34e688439713725d4215c63bc4cf876d8d0423
Showing with 1 addition and 1 deletion.
  1. +1 −1 build/tasks/build.js
View
@@ -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, "" );

0 comments on commit 0c34e68

Please sign in to comment.