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.
37 lines
935 B
37 lines
935 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', ['hterm'], () => gulp
|
|
.src([
|
|
'./libapps/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 ./libapps/hterm_all.js',
|
|
], {
|
|
verbose: true,
|
|
}));
|
|
|
|
gulp.task('default', ['compress'], () => {
|
|
return del(['./libapps']);
|
|
});
|
|
|