Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrodriguez committed Dec 12, 2017
2 parents 7c90022 + ea6e79a commit 5531783
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions gulp/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ const replace = require('gulp-rev-replace')
const htmlmin = require('gulp-htmlmin')

gulp.task('build', function(cb) {
gutil.log(gutil.colors.green('building site ...'))
gutil.log(
gutil.colors.green(`building site ... (${JSON.stringify(config.pipeline)})`)
)

// config.pipeline is an array of task names
// i.e.: ['images', 'styles']
sequence(...config.pipeline)
sequence(...config.pipeline, cb)
})

// .pipe(changed('staging/img'))
Expand All @@ -72,12 +74,13 @@ gulp.task('styles:cleancss', function() {
.pipe(autoprefixer(config.autoprefixer))
.pipe(cleancss(config.cleancss))
.pipe(concat('styles.css'))
.pipe(size({ title: 'styles: ' }))
.pipe(gulp.dest(path.join(config.build.target, config.path.styles))) // i.e.: public/styles/styles.css
})

// default styles task
gulp.task('styles', function() {
sequence('styles:cleancss')
gulp.task('styles', function(cb) {
sequence('styles:cleancss', cb)
})

gulp.task('scripts', function() {
Expand All @@ -86,6 +89,7 @@ gulp.task('scripts', function() {
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify())
.pipe(size({ title: 'scripts: ' }))
.pipe(gulp.dest(path.join(config.build.target, config.path.scripts)))
})

Expand Down Expand Up @@ -126,14 +130,15 @@ gulp.task('reference', function() {
})

gulp.task('fingerprint', function(cb) {
sequence('revision', 'reference')
sequence('revision', 'reference', cb)
})

gulp.task('html', function(cb) {
pump(
[
gulp.src(path.join(config.build.source, '**', '*.html')),
htmlmin(config.htmlmin),
size({ title: 'html: ' }),
gulp.dest(config.build.target)
],
cb
Expand Down
4 changes: 2 additions & 2 deletions gulp/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ gulp.task('styles:cleancss', function() {
})

// default styles task
gulp.task('styles', function() {
sequence('styles:cleancss')
gulp.task('styles', function(cb) {
sequence('styles:cleancss', cb)
})

gulp.task('scripts', function() {
Expand Down

0 comments on commit 5531783

Please sign in to comment.