added relative path in build folder creation
parent
90abf84693
commit
9ba3032a92
6
build.js
6
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);
|
||||
|
|
Loading…
Reference in New Issue