forked from leonardosnt/mc-player-counter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
29 lines (25 loc) · 790 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
'use strict';
const gulp = require('gulp');
const uglify = require('gulp-uglify');
const babel = require('gulp-babel');
const iife = require('gulp-iife');
const rename = require('gulp-rename');
const insert = require('gulp-insert');
const LICENSE_HEADER = `/*!
* https://github.com/leonardosnt/mc-player-counter
*
* Copyright (C) 2017 leonardosnt
* Licensed under the MIT License. See LICENSE file in the project root for full license information.
*/
`;
gulp.task('default', ['build']);
gulp.task('build', () => (
gulp.src('src/mc-player-counter.js')
.pipe(babel())
.pipe(iife({ useStrict: false }))
.pipe(gulp.dest('dist/'))
.pipe(rename('mc-player-counter.min.js'))
.pipe(uglify())
.pipe(insert.prepend(LICENSE_HEADER))
.pipe(gulp.dest('dist/'))
));