-
Notifications
You must be signed in to change notification settings - Fork 69
/
gulpfile.js
24 lines (20 loc) · 675 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
import gulp from 'gulp';
import concat from 'gulp-concat';
import expose from 'gulp-expose';
import stripLine from 'gulp-strip-line';
import gulpif from 'gulp-if';
import {deleteAsync} from 'del';
import jshint from 'gulp-jshint';
import stylish from 'jshint-stylish';
gulp.task('clean', () => deleteAsync(['dist/*']));
gulp.task('lint', () => gulp.src('src/*.gs')
.pipe(jshint())
.pipe(jshint.reporter(stylish))
);
gulp.task('dist', gulp.series('clean', 'lint', () => gulp.src('src/*.gs')
.pipe(gulpif(/OAuth1\.gs$/,
stripLine('var _ =')))
.pipe(concat('OAuth1.gs'))
.pipe(expose('this', 'OAuth1'))
.pipe(gulp.dest('dist'))
));