mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Add path.sep for older versions of Node.js.
Former-commit-id: 1a058681fc5c6aae426902a7d6dd76b3a5849837
This commit is contained in:
8
build.js
8
build.js
@@ -12,6 +12,9 @@
|
||||
minify = require(path.join(__dirname, 'build', 'minify.js')),
|
||||
mkdirpSync = require(path.join(__dirname, 'build', 'mkdirp-sync.js'));
|
||||
|
||||
/** Add `path.sep` for older versions of Node.js */
|
||||
path.sep || (path.sep = process.platform == 'win32' ? '\\' : '/');
|
||||
|
||||
/** The current working directory */
|
||||
var cwd = process.cwd();
|
||||
|
||||
@@ -22,7 +25,7 @@
|
||||
var push = arrayRef.push;
|
||||
|
||||
/** Used to detect the Node.js executable in command-line arguments */
|
||||
var reNode = /(?:^|[\/\\])node(?:\.exe)?$/;
|
||||
var reNode = RegExp('(?:^|' + path.sep + ')node(?:\\.exe)?$');
|
||||
|
||||
/** Shortcut used to convert array-like objects to arrays */
|
||||
var slice = arrayRef.slice;
|
||||
@@ -269,6 +272,9 @@
|
||||
'node'
|
||||
];
|
||||
|
||||
/** Add `path.sep` for older versions of Node.js */
|
||||
path.sep || (path.sep = process.platform == 'win32' ? '\\' : '/');
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user