1 Star 0 Fork 108

zxldragonmax/mdui

forked from zdhxiong/mdui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gulpfile.js 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
zdhxiong 提交于 2020-02-07 18:24 . v1
const { src, dest, parallel } = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
const header = require('gulp-header');
const less = require('gulp-less');
const rename = require('gulp-rename');
const sourcemaps = require('gulp-sourcemaps');
const pkg = require('./package.json');
const banner = `
/*!
* mdui ${pkg.version} (${pkg.homepage})
* Copyright 2016-${new Date().getFullYear()} ${pkg.author}
* Licensed under ${pkg.license}
*/
`.trim();
function css() {
return src('./src/index.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(header(banner))
.pipe(autoprefixer())
.pipe(rename('mdui.css'))
.pipe(sourcemaps.write('./'))
.pipe(dest('./dist/css'));
}
function cssMin() {
return src('./src/index.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(header(banner))
.pipe(autoprefixer())
.pipe(cleanCSS({ compatibility: 'ie11' }))
.pipe(rename('mdui.min.css'))
.pipe(sourcemaps.write('./'))
.pipe(dest('./dist/css'));
}
exports.default = parallel(css, cssMin);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
CSS
1
https://gitee.com/zxldragonmax/mdui.git
git@gitee.com:zxldragonmax/mdui.git
zxldragonmax
mdui
mdui
v1

搜索帮助