Skip to content

Commit

Permalink
gulpfile should also follow standardjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisbontje committed Apr 19, 2016
1 parent ac918b4 commit 13f9d0d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
42 changes: 21 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -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']));
gulp.task('deploy', gulpsync.sync(['build-dapple', 'build-meteor', 'deploy-gh-pages']))
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 13f9d0d

Please sign in to comment.