Fix build on Windows (#381)

Use `path.dirName` instead of a `file.replace` on regex'd replaced string
This commit is contained in:
Dániel Tar 2018-01-09 00:44:50 +01:00 committed by Joel Marcey
parent 65085b1337
commit 654916ae98
2 changed files with 7 additions and 7 deletions

View file

@ -433,7 +433,7 @@ function execute(port) {
path.basename(file),
'temp' + path.basename(file)
);
mkdirp.sync(tempFile.replace(new RegExp('/[^/]*$'), ''));
mkdirp.sync(path.dirname(tempFile));
fs.copySync(userFile, tempFile);
// render into a string