Skip to content

Commit

Permalink
Open browser after the first gulp build (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablopunk committed Sep 8, 2017
1 parent 85de868 commit 5ae3dd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion template/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const cssnano = require('cssnano');
const autoprefixer = require('autoprefixer');
const reporter = require('postcss-reporter');
const ms = require('ms');
const opn = require('opn');

const config = require('./config');

Expand Down Expand Up @@ -59,7 +60,12 @@ gulp.task('build', done => {
// TODO: add `rimraf dist`
// TODO: add remark-cli with -qfo options
// TODO: ensure depcheck, xo, pug-lint, remark lint called in lint task
runSequence('lint', 'css', ['img', 'js', 'static'], done);
runSequence('lint', 'css', ['img', 'js', 'static'], async () => {
if (!PROD) {
await opn(config.urls.web, { wait: false });
}
done();
});
});

gulp.task('publish', () => {
Expand Down
2 changes: 1 addition & 1 deletion template/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9407,7 +9407,7 @@ remark-heading-gap@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/remark-heading-gap/-/remark-heading-gap-3.0.0.tgz#f52ac47a27995ef3248a59eb7544b5620b4736a6"

"remark-license@github:niftylettuce/remark-license":
remark-license@niftylettuce/remark-license:
version "4.0.1"
resolved "https://codeload.github.com/niftylettuce/remark-license/tar.gz/17ecb8f64f8f6082414d14f9267a12764e6ddbfb"
dependencies:
Expand Down

0 comments on commit 5ae3dd6

Please sign in to comment.