加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
Álvaro 提交于 2016-10-12 11:50 . - Added fullpage.js extensions version
var gulp = require('gulp');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
var minifyCss = require('gulp-clean-css');
gulp.task('sass', function() {
gulp.src('./jquery.fullpage.scss')
.pipe(sass({
outputStyle: 'expanded'
}))
.pipe(gulp.dest('.'));
});
gulp.task('css', function() {
gulp.src('./jquery.fullpage.css')
.pipe(sourcemaps.init())
.pipe(gulp.dest('./dist'))
.pipe(minifyCss({
compatibility: 'ie8',
advanced: false,
keepSpecialComments: '1'
}))
.pipe(rename({suffix: '.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist'));
});
gulp.task('js', function() {
gulp.src('./jquery.fullpage.js')
.pipe(sourcemaps.init())
.pipe(gulp.dest('./dist'))
.pipe(uglify({
preserveComments: 'license'
}))
.pipe(rename({suffix: '.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist'));
});
//private file
gulp.task('extensions', function() {
gulp.src('./jquery.fullpage.extensions.js')
.pipe(uglify({
preserveComments: 'license'
}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./dist'));
});
gulp.task('default', ['css', 'js']);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化