代码拉取完成,页面将自动刷新
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']);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。