diff --git a/build.js b/build.js index 6b55591..b3f821a 100644 --- a/build.js +++ b/build.js @@ -47,14 +47,14 @@ files.forEach( file => { }); fs.cp('./src/styles','./build/styles', { recursive: true }, (err) => { - if (err) throw err; + if (err) throw err; }); function ensureDirectoryExists(filePath) { var dirname = filePath.split('/').slice(0,-1).join('/'); - if (fs.existsSync(dirname)) { - return true; + if (fs.existsSync("./" + dirname)) { + return true; } ensureDirectoryExists(dirname); fs.mkdirSync(dirname);