Permalink
Browse files

build fails if ./dist folder is not existing

  • Loading branch information...
1 parent 44d992b commit 4cb525ad1363697ed6bc4bddfbb83933ba24505f @visiongeist visiongeist committed May 20, 2014
Showing with 7 additions and 0 deletions.
  1. +7 −0 build.js
View
@@ -151,5 +151,12 @@ function build (release) {
// Write dist file
var distFile = buildFile.replace('/build/', '/dist/').replace('.js', '-min.js');
out = uglify.minify(out, { fromString: true });
+
+ // Make sure dist folder exists
+ if ( !fs.existsSync('dist') ) {
+ fs.mkdirSync('dist');
+ }
+
+ // Write files to target
fs.writeFileSync(distFile, banner + out.code);
}

0 comments on commit 4cb525a

Please sign in to comment.