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"

Cherry-picked from 0c34e68
Fixes gh-2450
Closes gh-2641
  • Loading branch information...
Martin Naumann authored and markelog committed Oct 12, 2015
1 parent ef6cd83 commit 4e3f9718666e3cc98b2b149e4b68069c01418db4
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 4e3f971

Please sign in to comment.