]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
bs-commonjs-generator.js: always use forward slashes in the require path. 14876/head
authorXhmikosR <xhmikosr@gmail.com>
Sun, 26 Oct 2014 07:35:14 +0000 (09:35 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 26 Oct 2014 07:35:14 +0000 (09:35 +0200)
Since `path.resolve` is using backslashes on Windows, we ended up with different files. Just replace those with forward slashes.

grunt/bs-commonjs-generator.js

index 18542cc74f481353881c000a7bb0160223d344e0..e28900fb5e58532c5c95414e6cbff0558450d63f 100644 (file)
@@ -8,7 +8,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
   var destDir = path.dirname(destFilepath);
 
   function srcPathToDestRequire(srcFilepath) {
-    var requirePath = path.relative(destDir, srcFilepath);
+    var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
     return 'require(\'' + requirePath + '\')';
   }