diff --git a/gulpfile.js b/gulpfile.js index 1146a693e2..4c1b05b3e2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,7 @@ var shell = require('gulp-shell'); var sourcemaps = require('gulp-sourcemaps'); var dependencies = Object.keys(packagejson.dependencies); -var isBeta = process.argv.indexOf('--beta') !== -1; +var argv = require('minimist')(process.argv.slice(2)); var settings; try { @@ -25,15 +25,15 @@ try { } catch (err) { settings = {}; } -settings.beta = isBeta; +settings.beta = argv.beta; var options = { dev: process.argv.indexOf('release') === -1, - beta: isBeta, - appFilename: isBeta ? 'Kitematic (Beta).app' : 'Kitematic.app', - appName: isBeta ? 'Kitematic (Beta)' : 'Kitematic', + beta: argv.beta, + appFilename: argv.beta ? 'Kitematic (Beta).app' : 'Kitematic.app', + appName: argv.beta ? 'Kitematic (Beta)' : 'Kitematic', name: 'Kitematic', - icon: isBeta ? './util/kitematic-beta.icns' : './util/kitematic.icns', + icon: argv.beta ? './util/kitematic-beta.icns' : './util/kitematic.icns', bundle: 'com.kitematic.kitematic' }; @@ -63,7 +63,6 @@ gulp.task('styles', function () { return gulp.src('styles/main.less') .pipe(plumber(function(error) { gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message)); - // emit the end event, to properly end the task this.emit('end'); })) .pipe(gulpif(options.dev, changed('./build'))) diff --git a/package.json b/package.json index a97043887f..eb834ed4e6 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "dockerode": "^2.1.1", "exec": "0.2.0", "jquery": "^2.1.3", - "minimist": "^1.1.1", "mixpanel": "0.2.0", "node-uuid": "^1.4.3", "object-assign": "^2.0.0", @@ -89,8 +88,10 @@ "gulp-shell": "^0.4.1", "gulp-sourcemaps": "^1.5.2", "gulp-util": "^3.0.4", + "gulp": "^3.8.11", "jest-cli": "kitematic/jest", "jsxhint": "^0.14.0", + "minimist": "^1.1.1", "react-tools": "^0.13.1", "run-sequence": "^1.0.2" }