From 2ea25dc871620ad6934f068fc71493ae8b1c3aef Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 30 Dec 2014 13:12:18 -0400 Subject: [PATCH] Implement gulp release task --- gulpfile.coffee | 15 ++++++++++----- package.json | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index bd6fe95d..ccb5b7df 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -1,10 +1,13 @@ +mkdirp = require('mkdirp') path = require('path') gulp = require('gulp') mocha = require('gulp-mocha') coffee = require('gulp-coffee') markedMan = require('gulp-marked-man') coffeelint = require('gulp-coffeelint') +shell = require('gulp-shell') mochaNotifierReporter = require('mocha-notifier-reporter') +packageJSON = require('./package.json') OPTIONS = config: @@ -30,7 +33,7 @@ gulp.task 'test', -> reporter: mochaNotifierReporter.decorate('landing') })) -gulp.task 'coffee', -> +gulp.task 'coffee', [ 'test', 'lint' ], -> gulp.src(OPTIONS.files.app) .pipe(coffee()) .pipe(gulp.dest(OPTIONS.directories.build)) @@ -46,10 +49,12 @@ gulp.task 'lint', -> })) .pipe(coffeelint.reporter()) -gulp.task 'compile', [ - 'coffee' - 'json' -] +gulp.task 'release', [ 'coffee', 'json' ], -> + mkdirp.sync('build/Release') + gulp.src('') + .pipe(shell "jx package app.js Release/#{packageJSON.name} -native", { + cwd: path.join(process.cwd(), OPTIONS.directories.build) + }) gulp.task 'build', [ 'lint' diff --git a/package.json b/package.json index 48256913..bbffa6e5 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "gulp-coffeelint": "~0.4.0", "gulp-marked-man": "~0.3.1", "gulp-mocha": "~1.1.1", + "gulp-shell": "^0.2.11", "gulp-util": "~3.0.1", "mocha": "~2.0.1", "mocha-notifier-reporter": "~0.1.0", @@ -46,8 +47,7 @@ "ronn": "~0.4.0", "run-sequence": "~1.0.2", "sinon": "~1.12.1", - "sinon-chai": "~2.6.0", - "through2": "~0.6.3" + "sinon-chai": "~2.6.0" }, "dependencies": { "request": "~2.47.0",