This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/gulpfile.js
2018-09-30 20:21:59 +02:00

22 lines
556 B
JavaScript

var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify-es').default;
var selfExecute = require('gulp-self-execute');
var paths = {
scripts: 'client/js/**/*.js',
images: 'client/img/**/*'
};
gulp.task('js', function(){
return gulp.src(paths.scripts)
.pipe(sourcemaps.init())
.pipe(concat('app.min.js'))
.pipe(uglify())
.pipe(selfExecute())
.pipe(sourcemaps.write())
.pipe(gulp.dest('static'))
});
gulp.task('default', [ 'js' ]);