forked from monkeecreate/jquery.simpleWeather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (35 loc) · 1.15 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
bump = require('gulp-bump'),
notify = require('gulp-notify'),
git = require('gulp-git'),
size = require('gulp-size'),
pkg = require('./package.json');
var source = "jquery.simpleWeather.js",
sourceMin = "jquery.simpleWeather.min.js";
gulp.task('lint', function () {
return gulp.src(source)
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('build', ['lint'], function () {
return gulp.src(source)
.pipe(rename(sourceMin))
.pipe(uglify({preserveComments: 'some'}))
.pipe(size())
.pipe(gulp.dest('./'));
});
gulp.task('bump', function () {
return gulp.src(['./bower.json', './component.json', 'simpleweather.jquery.json'])
.pipe(bump({version: pkg.version}))
.pipe(gulp.dest('./'));
});
gulp.task('tag', ['bump'], function () {
return gulp.src('./')
.pipe(git.commit('Version '+pkg.version))
.pipe(git.tag(pkg.version, 'Version '+pkg.version))
.pipe(git.push('monkee', 'master', '--tags'))
.pipe(gulp.dest('./'));
});