forked from valnub/Framework7-Upscroller-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (38 loc) · 1.09 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
40
41
42
43
44
45
var gulp = require('gulp'),
gutil = require('gulp-util'),
sourcemaps = require('gulp-sourcemaps'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
connect = require('gulp-connect'),
open = require('gulp-open'),
minifyCss = require('gulp-minify-css');
gulp.task('build', function() {
gulp.src(['src/**/*'])
.pipe(gulp.dest('build'));
gulp.src('src/framework7.upscroller.js')
.pipe(sourcemaps.init())
.pipe(concat('framework7.upscroller.min.js'))
.pipe(uglify())
.pipe(sourcemaps.write()).pipe(gulp.dest('build'));
gulp.src('src/framework7.upscroller.css')
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(concat('framework7.upscroller.min.css'))
.pipe(gulp.dest('build'));
});
gulp.task('dist', function() {
gulp.src([
'build/**/*'
])
.pipe(gulp.dest('dist'));
});
gulp.task('open', function() {
return gulp.src('./demo/index.html').pipe(open({
uri : 'http://localhost:3000/demo'
}));
});
gulp.task('connect', function() {
connect.server({
port : '3000'
});
});
gulp.task('server', [ 'connect', 'open' ]);