-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gulpfile should also follow standardjs
- Loading branch information
1 parent
ac918b4
commit 13f9d0d
Showing
2 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters