130 Star 532 Fork 128

skyvow/wux-weapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build-example.js 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
skyvow 提交于 1年前 . feat: optimize components
import path from 'path'
import gulp from 'gulp'
import * as utils from './build-utils'
import getOutput from './get-output'
const srcPath = path.join(__dirname, '../src')
const buildPath = `${getOutput()}/dist`
const files = utils.files
const paths = {
styles: {
src: [`${srcPath}/**/*.less`],
dest: buildPath,
},
colors: {
src: [`${srcPath}/helpers/colors.js`],
dest: buildPath,
},
copy: {
src: [`${srcPath}/**`, `!${srcPath}/**/*.less`, `!${srcPath}/icon/fonts/**`],
dest: buildPath,
},
}
paths.styles.src = [
`${srcPath}/styles/*.less`,
...files.map((v) => `${srcPath}/${v}/*.less`),
]
paths.copy.src = [
...files.map((v) => `${srcPath}/${v}/**`),
`!${srcPath}/**/*.less`,
`!${srcPath}/icon/fonts/**`,
`${srcPath}/helpers/**`,
// `${srcPath}/index.js`,
// `${srcPath}/config.json`,
]
const styles = utils.styles(paths.styles, srcPath, false)
const copy = utils.copy(paths.copy, srcPath)
const colors = utils.generateColors(paths.colors, srcPath, false)
const watchFiles = () => {
gulp.watch(paths.styles.src, styles)
gulp.watch(paths.copy.src, copy)
}
export { watchFiles as watch }
export default gulp.series(
gulp.parallel(
styles,
copy,
utils.generateFiles(buildPath, false),
utils.generateConfig(buildPath),
),
colors,
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/skyvow/wux.git
git@gitee.com:skyvow/wux.git
skyvow
wux
wux-weapp
master

搜索帮助