From 13f9d0d90ca61ee39d3f16b83c6bfc60fd59601d Mon Sep 17 00:00:00 2001 From: Joris Bontje Date: Tue, 19 Apr 2016 15:22:39 +0200 Subject: [PATCH] gulpfile should also follow standardjs --- gulpfile.js | 42 +++++++++++++++++++++--------------------- package.json | 5 +++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2c722a1..c7ad819 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,41 +1,41 @@ -var exec = require('child_process').exec; +var exec = require('child_process').exec -var gulp = require('gulp'); -var gulpsync = require('gulp-sync')(gulp); -var ghPages = require('gulp-gh-pages'); +var gulp = require('gulp') +var gulpsync = require('gulp-sync')(gulp) +var ghPages = require('gulp-gh-pages') // npm run build gulp.task('build-dapple', function (cb) { - exec('dapple build --template meteor --no-deploy-data', function(err, res, failed) { + exec('dapple build --template meteor --no-deploy-data', function (err, res, failed) { if (err) { - console.log(err); + console.log(err) } else if (failed) { - process.stdout.write(failed); + process.stdout.write(failed) } else { - process.stdout.write("\u001b[32mDapple build completed!\n"); + process.stdout.write('\u001b[32mDapple build completed!\n') } - cb(err); - }); -}); + cb(err) + }) +}) // meteor-build-client ../build gulp.task('build-meteor', function (cb) { - exec('meteor-build-client ../dist --path ""', {cwd: 'frontend'}, function(err, res, failed) { + exec('meteor-build-client ../dist --path ""', {cwd: 'frontend'}, function (err, res, failed) { if (err) { - console.log(err); + console.log(err) } else if (failed) { - process.stdout.write(failed); + process.stdout.write(failed) } else { - process.stdout.write("\u001b[32mMeteor build completed!\n"); + process.stdout.write('\u001b[32mMeteor build completed!\n') } - cb(err); + cb(err) }) -}); +}) // gh-pages -gulp.task('deploy-gh-pages', function() { +gulp.task('deploy-gh-pages', function () { return gulp.src('./dist/**/*') - .pipe(ghPages()); -}); + .pipe(ghPages()) +}) -gulp.task('deploy', gulpsync.sync(['build-dapple', 'build-meteor', 'deploy-gh-pages'])); \ No newline at end of file +gulp.task('deploy', gulpsync.sync(['build-dapple', 'build-meteor', 'deploy-gh-pages'])) diff --git a/package.json b/package.json index 4f312ce..dc98528 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,11 @@ "deploy": "dapple run scripts/deploy_private.ds", "build": "dapple build --template meteor --no-deploy-data", "blockchain": "./scripts/blockchain/start-blockchain.sh", - "attach": "geth attach ipc://$PWD/scripts/blockchain/tmp/geth.ipc" + "attach": "geth attach ipc://$PWD/scripts/blockchain/tmp/geth.ipc", + "test": "standard" }, "devDependencies": { - "babel-eslint": "5.0.0", + "babel-eslint": "6.0.0", "gulp": "^3.9.1", "gulp-gh-pages": "^0.5.4", "gulp-sync": "^0.1.4",