aboutsummaryrefslogtreecommitdiff
path: root/scripts/gulpfile.js
blob: 67c5bf7c12bae7d93f2ae552d073ae174a527afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { src, dest } = require('gulp');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const concat = require('gulp-concat');
const babel = require('gulp-babel');
 
exports.default = function() {
  return src('src/*.js')
    .pipe(babel({
            presets: ['@babel/env']
     }))
    .pipe(concat('package.js'))
    .pipe(uglify())
    .pipe(dest('../media/js/'))
    .pipe(rename({ extname: '.min.js' }))
    .pipe(dest('../media/js/'));
}