Skip to content

Commit

Permalink
build fails if ./dist folder is not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
visiongeist committed May 20, 2014
1 parent 44d992b commit 4cb525a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.