forked from Promo/scrollissimo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (26 loc) · 706 Bytes
/
gulpfile.js
File metadata and controls
27 lines (26 loc) · 706 Bytes
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
const gulp = require('gulp'),
babel = require('gulp-babel'),
insert = require('gulp-insert'),
rename = require('gulp-rename'),
packageInfo = require('./package.json'),
SCROLLISSIMO_BADGE = `/**
* Scrollissimo
* Javascript plugin for smooth scroll-controlled animations
* @version ${packageInfo.version}
* @author frux <qdinov@yandex.ru>
* @url https://github.com/Promo/scrollissimo
*/\n`;
gulp.task('es5', function(){
gulp.src('./src/scrollissimo.js')
.pipe(babel({
presets: ['es2015'],
compact: true,
comments: false,
plugins: ['transform-es2015-modules-umd']
}))
.pipe(insert.prepend(SCROLLISSIMO_BADGE))
.pipe(rename({
extname: '.min.js'
}))
.pipe(gulp.dest('./dist'));
});