Files
cypress/packages/example/gulpfile.js
Gleb Bahmutov f83b86a91a example: lint the JS files (#63)
* add standard linter to example project

* lint bin/convert script

* lint more js files, run linter pretest
2017-05-19 13:27:06 -04:00

47 lines
1.0 KiB
JavaScript

var gulp = require('gulp')
var ghPages = require('gulp-gh-pages')
var clean = require('gulp-clean')
var RevAll = require('gulp-rev-all')
var runSequence = require('run-sequence')
gulp.task('assets', function () {
var revAll = new RevAll({
dontGlobal: ['.ico', 'fira.css', 'javascript-logo.png'],
dontRenameFile: ['.ico', '.html', /fonts/],
dontSearchFile: ['.js'],
debug: false
})
return gulp.src('./app/**/*')
.pipe(revAll.revision())
.pipe(gulp.dest('build'))
})
gulp.task('cname', function () {
return gulp.src('CNAME')
.pipe(gulp.dest('build'))
})
gulp.task('gitignore', function () {
return gulp.src('.gitignore')
.pipe(gulp.dest('build'))
})
gulp.task('clean', function () {
return gulp.src('./build')
.pipe(clean())
})
gulp.task('push-gh-pages', function () {
return gulp.src('build/**/*')
.pipe(ghPages())
})
gulp.task('build', function (cb) {
return runSequence('clean', ['assets', 'cname', 'gitignore'], cb)
})
gulp.task('deploy', function (cb) {
return runSequence('build', 'push-gh-pages', cb)
})