forked from carlsednaoui/ouibounce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (33 loc) · 1.13 KB
/
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
37
38
39
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
prefix = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
umd_wrap = require('gulp-wrap-umd'),
stylus = require('gulp-stylus'),
rename = require('gulp-rename');
gulp.task('build', function() {
gulp.src('source/ouibounce.js')
.pipe(umd_wrap({ namespace: 'ouibounce' }))
.pipe(gulp.dest('build'));
gulp.src('source/ouibounce.js')
.pipe(umd_wrap({ namespace: 'ouibounce' }))
.pipe(uglify())
.pipe(rename('ouibounce.min.js'))
.pipe(gulp.dest('build'));
gulp.src('test/ouibounce.styl')
.pipe(stylus())
.pipe(prefix())
.pipe(rename('ouibounce.css'))
.pipe(gulp.dest('test'));
gulp.src('test/ouibounce.styl')
.pipe(stylus())
.pipe(prefix())
.pipe(minifyCSS())
.pipe(rename('ouibounce.min.css'))
.pipe(gulp.dest('test'));
});
// Rerun the task when a file changes
gulp.task('watch', function () {
gulp.watch('test/ouibounce.styl', ['build']);
gulp.watch('source/ouibounce.js', ['build']);
});