forked from pbakondy/filelogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (27 loc) · 928 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
var gulp = require('gulp'),
buildConfig = require('./config/build.config'),
footer = require('gulp-footer'),
header = require('gulp-header'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename');
gulp.task('default', ['build']);
gulp.task('build', function () {
gulp.src(buildConfig.pluginFiles)
.pipe(header(buildConfig.closureStart))
.pipe(footer(buildConfig.closureEnd))
.pipe(header(buildConfig.banner))
.pipe(gulp.dest(buildConfig.dist));
return gulp.src(buildConfig.pluginFiles)
.pipe(header(buildConfig.closureStart))
.pipe(footer(buildConfig.closureEnd))
.pipe(uglify())
.pipe(header(buildConfig.banner))
.pipe(rename({extname: '.min.js'}))
.pipe(gulp.dest(buildConfig.dist));
});
gulp.task('lint', function () {
return gulp.src('./src/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});