代码拉取完成,页面将自动刷新
// Gulpfile.js
"use strict";
var gulp = require("gulp"),
eslint = require("gulp-eslint"),
less = require("gulp-less"),
minifyCSS = require("gulp-minify-css"),
path = require("path"),
notify = require("gulp-notify"),
clean = require("gulp-clean"),
rename = require("gulp-rename"),
uglify = require("gulp-uglify");
gulp.task("less", function() {
gulp.src("src/less/bootstrap-dialog.less")
.pipe(gulp.dest("dist/less"))
.pipe(less({
paths: [path.join(__dirname, "less", "includes")]
}))
.pipe(gulp.dest("dist/css"))
.pipe(gulp.dest("src/css"))
.pipe(gulp.dest("examples/assets/bootstrap-dialog/css"))
.pipe(rename("bootstrap-dialog.min.css"))
.pipe(minifyCSS())
.pipe(gulp.dest("dist/css"))
.pipe(gulp.dest("examples/assets/bootstrap-dialog/css"));
});
gulp.task("lint", function() {
gulp.src(["src/js/bootstrap-dialog.js"])
.pipe(eslint())
.pipe(eslint.format());
});
gulp.task("dist", ["clean", "less"], function() {
gulp.src(["src/js/bootstrap-dialog.js"])
.pipe(gulp.dest("dist/js"))
.pipe(gulp.dest("examples/assets/bootstrap-dialog/js"))
.pipe(rename("bootstrap-dialog.min.js"))
.pipe(uglify())
.pipe(gulp.dest("dist/js"))
.pipe(gulp.dest("examples/assets/bootstrap-dialog/js"))
.pipe(notify({
message: "Build task completed."
}));
});
gulp.task("clean", function() {
return gulp.src(["dist/"], {
read: false
})
.pipe(clean());
});
gulp.task("default", ["clean"], function() {
gulp.start("dist");
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。