commit e207124f88932a469b6f2633cdf8c76fd3a9084b
parent c335099465f5587e26cf1804652a8fa985ba8056
Author: Tom Najdek <tom@doppnet.com>
Date: Sat, 3 Jun 2017 17:48:42 +0100
On Windows, copy files instead of symlinking
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gulpfile.js b/gulpfile.js
@@ -14,6 +14,7 @@ const tap = require('gulp-tap');
const rename = require('gulp-rename');
const browserify = require('browserify');
const reactPatcher = require('./gulp/gulp-react-patcher');
+const isWindows = /^win/.test(process.platform);
const NODE_ENV = process.env.NODE_ENV;
const workers = [];
var isExiting = false;
@@ -184,12 +185,12 @@ function getSymlinks(exitOnError = true) {
.concat([`!./${formatDirsforMatcher(copyDirs)}/**`]);
return gulp
- .src(match, { nodir: true, base: '.', read: false })
+ .src(match, { nodir: true, base: '.', read: isWindows })
.on('error', function(err) { onError.bind(this)(exitOnError, err); })
.on('data', file => {
onSuccess(`[ln] ${file.path.substr(__dirname.length + 1)}`);
})
- .pipe(vfs.symlink('build/'));
+ .pipe(isWindows ? gulp.dest('build/') : vfs.symlink('build/'));
}
function getCopy(exitOnError = true) {