Remove useless gulp scripts

This commit is contained in:
Tyler Long
2017-09-01 17:45:01 +08:00
parent a18179e6db
commit 51fe2e8a9b
2 changed files with 0 additions and 88 deletions

View File

@@ -1,42 +0,0 @@
var gulp = require('gulp')
var bump = require('gulp-bump')
var tagVersion = require('gulp-tag-version')
gulp.task('bump', function () {
gulp.src('./bw.json')
.pipe(bump({ key: 'version' }))
.pipe(gulp.dest('./'))
})
// Assuming there's "version: 1.2.3" in package.json,
// tag the last commit as "v1.2.3"//
gulp.task('tag', function () {
return gulp.src(['./package.json']).pipe(tagVersion())
})
/**
* Bumping version number and tagging the repository with it.
* Please read http://semver.org/
*
* You can use the commands
*
* gulp patch # makes v0.1.0 → v0.1.1
* gulp feature # makes v0.1.1 → v0.2.0
* gulp release # makes v0.2.1 → v1.0.0
*
* To bump the version numbers accordingly after you did a patch,
* introduced a feature or made a backwards-incompatible release.
*/
function inc (importance) {
// get all the files to bump version in
return gulp.src(['./package.json'])
// bump the version number in those files
.pipe(bump({ type: importance }))
// save it back to filesystem
.pipe(gulp.dest('./'))
}
gulp.task('patch', function () { return inc('patch') })
gulp.task('feature', function () { return inc('minor') })
gulp.task('release', function () { return inc('major') })

View File

@@ -1,46 +0,0 @@
var gulp = require('gulp')
var jasmine = require('gulp-jasmine')
var istanbul = require('gulp-istanbul')
var qunit = require('gulp-qunit')
var bower = require('gulp-bower')
gulp.task('test', ['coverage', 'jasmine', 'qunit'])
gulp.task('jasmine', ['jison', 'lint'], function () {
return gulp.src(['src/**/*.spec.js'])
.pipe(jasmine({ includeStackTrace: true }))
})
gulp.task('jas', function () {
return gulp.src(['src/**/*.spec.js'])
.pipe(jasmine({ includeStackTrace: true }))
})
gulp.task('coverage', function (cb) {
gulp.src(['src/**/*.js', '!src/**/*.spec.js'])
.pipe(istanbul()) // Covering files
.on('finish', function () {
gulp.src(['src/**/*.spec.js'])
.pipe(jasmine())
.pipe(istanbul.writeReports()) // Creating the reports after tests runned
.on('end', cb)
})
})
gulp.task('qunit', ['usageTestsBower'], function () {
return gulp.src('test/usageTests/requireTest.html')
.pipe(qunit())
})
gulp.task('usageTestsBower', function () {
return bower({ cwd: 'test/usageTests' })
.pipe(gulp.dest('test/usageTests/bower_components'))
})
var jasmineBrowser = require('gulp-jasmine-browser')
gulp.task('jasmine2', function () {
return gulp.src(['src/**/*.js'])
.pipe(jasmineBrowser.specRunner({ console: true }))
.pipe(jasmineBrowser.headless())
})