forked from tobibeer/tw5-preview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (27 loc) · 888 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/********************************************************************
* Imports
*******************************************************************/
var gulp = require("gulp"),
gutil = require("gulp-util"),
clean = require('gulp-clean');
uglify = require("gulp-uglify"),
dest = "plugins/tobibeer/preview/";
/********************************************************************
* Tasks
*******************************************************************/
gulp.task("clean", function () {
//empty target
return gulp.src(dest, {read: false})
.pipe(clean());
});
gulp.task("build", ["clean"], function () {
// copy non-js
gulp.src(["src/**", "!**/*.js"])
.pipe(gulp.dest(dest));
// uglify js
gulp.src("src/**/*.js")
.pipe(uglify({ compress: false, preserveComments: "some" }))
.pipe(gulp.dest(dest));
});
gulp.task("default", ["clean", "build"], function () {
})