1 Star 0 Fork 1.6K

Gemiman.2# / Avue

forked from smallwei / Avue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gulpfile.js 976 Bytes
一键复制 编辑 原始数据 按行查看 历史
smallwei 提交于 2021-01-13 14:05 . build v2.7.6
const gulp = require("gulp");
var sass = require("gulp-sass");
var autoprefixer = require("gulp-autoprefixer");
var cssmin = require("gulp-cssmin");
const webpack = require("webpack");
const webpackConf = require("./build/build.js");
// 构建webpack配置
gulp.task("webpack", async function() {
await webpack(webpackConf, function(err, stats) {
if (err) {
console.log(err);
}
});
});
// 处理样式的配置
gulp.task("compile", function() {
return gulp
.src("./styles/index.scss")
.pipe(sass.sync())
.pipe(
autoprefixer({
browsers: ["ie > 9", "last 2 versions"],
cascade: false
})
)
.pipe(cssmin())
.pipe(gulp.dest("./lib/"));
});
// 打包文件
gulp.task("build", gulp.series(["webpack", "compile"]));
// 监听文件变化
gulp.task("watch", async function() {
gulp.watch(["./src/**", "./packages/**"], gulp.series(["webpack"]));
gulp.watch(["./styles/**"], gulp.series(["compile"]));
});
JavaScript
1
https://gitee.com/gemiman2018/avue.git
git@gitee.com:gemiman2018/avue.git
gemiman2018
avue
Avue
master

搜索帮助