Skip to content

Commit

Permalink
Fix small bug with clean script and make sure dist and dist/js direct…
Browse files Browse the repository at this point in the history
…ories are created during build scripts
  • Loading branch information
kodie committed Oct 20, 2021
1 parent 9667422 commit 483df6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions task/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ console.log();

fs.existsSync("log") || fs.mkdirSync("log");
fs.existsSync("tmp") || fs.mkdirSync("tmp");
fs.existsSync("dist") || fs.mkdirSync("dist");
fs.existsSync("dist/js") || fs.mkdirSync("dist/js");

/*
const options = (function(argv){
Expand Down
2 changes: 2 additions & 0 deletions task/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const fs = require('fs');

fs.existsSync("log") || fs.mkdirSync("log");
fs.existsSync("tmp") || fs.mkdirSync("tmp");
fs.existsSync("dist") || fs.mkdirSync("dist");
fs.existsSync("dist/js") || fs.mkdirSync("dist/js");

const image = process.argv[2] === "--image";
//const template = process.argv[2] === "--template";
Expand Down
2 changes: 1 addition & 1 deletion task/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ const removeDir = function(path) {
}
}

const distPath = path.join(__dirname, 'dist')
const distPath = path.join('dist')

removeDir(distPath);

0 comments on commit 483df6f

Please sign in to comment.