forked from jlmakes/scrollreveal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
29 lines (22 loc) · 806 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
var gulp = require( 'gulp' )
, uglify = require( 'gulp-uglify' )
, umd = require( 'gulp-wrap-umd' )
, rename = require( 'gulp-rename' )
, livereload = require( 'gulp-livereload' )
gulp.task( 'wrap', function() {
gulp.src( 'scrollReveal.js' )
.pipe( umd({ namespace: 'scrollReveal', exports: 'scrollReveal' }) )
.pipe( gulp.dest( 'dist' ) )
})
gulp.task( 'minify', function() {
gulp.src( 'scrollReveal.js' )
.pipe( umd({ namespace: 'scrollReveal', exports: 'scrollReveal' }) )
.pipe( uglify() )
.pipe( rename( 'scrollReveal.min.js' ) )
.pipe( gulp.dest( 'dist' ) )
})
gulp.task( 'default', function() {
livereload.listen()
gulp.watch([ 'dev/*.html', '*.js']).on( 'change', livereload.changed )
})
gulp.task( 'build', [ 'wrap', 'minify' ])