-
Notifications
You must be signed in to change notification settings - Fork 3
/
gulpfile.js
35 lines (29 loc) · 957 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var del = require('del');
var paths = {
ownScripts: ['./src/*.js'],
scripts: ['./bower_components/fingerprintjs2/fingerprint2.js', './src/*.js'],
images: './images/*'
};
gulp.task('clean', function() {
return del(['dist']);
});
gulp.task('script-standalone', ['clean'], function() {
return gulp.src(paths.scripts)
.pipe(uglify())
.pipe(concat('refingerprint.min.js'))
.pipe(gulp.dest('./dist'));
});
gulp.task('script-partial', ['clean'], function() {
return gulp.src(paths.ownScripts)
.pipe(uglify())
.pipe(concat('refingerprint.partial.min.js'))
.pipe(gulp.dest('./dist'));
});
gulp.task('images', ['clean'], function() {
return gulp.src(paths.images)
.pipe(gulp.dest('./dist/images'));
});
gulp.task('default', ['script-standalone', 'script-partial', 'images']);