You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
987 B

const gulp = require('gulp');
const concat = require('gulp-concat');
const minify = require('gulp-minify');
const babel = require('gulp-babel');
const shell = require('gulp-shell');
const del = require('del');
gulp.task('compress', [], () =>
gulp
.src(['./src/hterm_all.js', './src/wetty.js'])
.pipe(concat('wetty.js'))
.pipe(babel())
.pipe(
minify({
ext: {
min: '.min.js',
},
exclude : ['tasks'],
noSource : true,
ignoreFiles: ['.combo.js', '*.min.js'],
}),
)
.pipe(gulp.dest('./public/wetty')),
);
gulp.task(
'hterm',
shell.task(
[
'git clone https://chromium.googlesource.com/apps/libapps',
'LIBDOT_SEARCH_PATH=$(pwd)/libapps ./libapps/libdot/bin/concat.sh -i ./libapps/hterm/concat/hterm_all.concat -o ./src/hterm_all.js',
],
{
verbose: true,
},
),
);
gulp.task('default', ['compress']);
gulp.task('upgrade', ['hterm'], () => del(['./libapps']));