testit/gulpfile.js

27 lines
788 B
JavaScript
Raw Normal View History

2020-09-08 22:29:56 +00:00
const gulp = require("gulp");
2018-11-09 15:40:40 +00:00
const minify = require("gulp-minify");
2020-09-08 22:29:56 +00:00
const strip = require("gulp-strip-comments");
const rollup = require("gulp-rollup-2").rollup;
2018-04-07 08:03:46 +00:00
2018-11-09 15:40:40 +00:00
gulp.task("default", function build() {
return gulp.src("./src/testit.js")
2020-09-08 22:29:56 +00:00
.pipe(rollup({
input: "./src/testit.js",
output: [
{
file: "testit.js",
name: "es",
format: "es"
},
{
file: "testit.umd.js",
name: "umd",
format: "umd"
},
]
}))
2018-04-07 08:03:46 +00:00
.pipe(strip({safe: true}))
.pipe(minify({ext: {min: ".min.js"}}))
.pipe(gulp.dest("dist"))
2020-09-08 22:29:56 +00:00
});