forked from needim/wdt-emoji-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (26 loc) · 977 Bytes
/
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
var gulp = require('gulp'),
bump = require('gulp-bump'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
download = require('gulp-download-stream'),
shell = require('gulp-shell');
gulp.task('bump', function () {
return gulp.src(['wdt-emoji-bundle.js', 'package.json'])
.pipe(bump({type: 'patch'}))
.pipe(gulp.dest('./'));
});
gulp.task('create:json', ['get:emojidata'], function () {
shell.task('php ./build/build.php');
});
gulp.task('get:emojidata', function () {
return download("https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji_pretty.json", {
headers: {'User-Agent': 'wdt-emoji-bundle'}
}).pipe(gulp.dest('./build/'));
});
gulp.task('uglify', function () {
return gulp.src(['wdt-emoji-bundle.js', 'emoji.js'])
.pipe(uglify({preserveComments: 'license'}))
.pipe(rename({suffix: ".min"}))
.pipe(gulp.dest('./'));
});
gulp.task('build', ['bump', 'uglify']);