0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

bs-commonjs-generator.js: always use forward slashes in the require path.

Since `path.resolve` is using backslashes on Windows, we ended up with different files. Just replace those with forward slashes.
This commit is contained in:
XhmikosR 2014-10-26 09:35:14 +02:00
parent bab3679d10
commit 37facee922

View 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 + '\')';
}