mendel-development
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "mendel-development", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Mendel shared dependencies for build and development", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,3 @@ /* Copyright 2015, Yahoo Inc. | ||
var path = require('path'); | ||
var falafel = require('falafel'); | ||
@@ -19,3 +20,3 @@ var isRequire = require('./falafel-util').isRequire; | ||
function replaceRequiresOnSource (src, dirs, wrap) { | ||
function replaceRequiresOnSource (destinationPath, src, dirs, wrap) { | ||
var opts = { | ||
@@ -32,2 +33,8 @@ ecmaVersion: 6, | ||
node.update("__mendel_require__('" + match.file + "')"); | ||
} else if (isAbsolutePath(module)) { | ||
node.update( | ||
"require('"+ | ||
path.relative(path.dirname(destinationPath), module)+ | ||
"')" | ||
); | ||
} | ||
@@ -43,1 +50,9 @@ } | ||
module.exports.wrap = _wrap; | ||
// isAbsolutePath copied from browserify MIT licenced source code | ||
function isAbsolutePath (file) { | ||
var regexp = process.platform === 'win32' ? | ||
/^\w:/ : | ||
/^\//; | ||
return regexp.test(file); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8860
244