Permalink
Browse files

Checking if dist dir exists when compiling.

  • Loading branch information...
1 parent 2adbbaf commit fd4e069cb12ef6b249c618677a2f48213dff4bda @tiagoalves tiagoalves committed Jun 10, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 compile.js
View
@@ -13,7 +13,9 @@ js.bundle(function(err, file){
var fileName;
var minified = UglifyJS(file);
- fs.mkdirSync('dist');
+ if (!fs.existsSync('dist')) {
+ fs.mkdirSync('dist');
+ }
fileName = __dirname + '/dist/muzzley-client-' + version.version + '.js';
fs.writeFileSync(fileName, file);

0 comments on commit fd4e069

Please sign in to comment.