1 Star 0 Fork 1

一生所爱蛋蛋/happy-coastal-city-dev

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gulpfile.js 2.47 KB
一键复制 编辑 原始数据 按行查看 历史
一生所爱蛋蛋 提交于 2023-03-17 15:54 . 提价
/**
* Description: reauired, the file description, reference link, etc.
* Created Date: 2021-03-22 7:32:39 PM
* Author: Liu Man <lm@hcttop.com>
* -----
* Last Modified: 2021-03-22, 7:32:39 PM
* Modified By: Liu Man <lm@hcttop.com>
*/
const path = require('path');
const gulp = require('gulp');
const cleanCSS = require('gulp-clean-css');
const cssWrap = require('gulp-css-wrap');
const LIGHT_THEME = '.light';
const DARK_THEME = '.dark';
const GREEN_THEME = '.green';
const BLUE_THEME = '.blue';
gulp.task('css-wrap-light', () =>
gulp
.src(path.resolve('./theme/light/index.css'))
.pipe(cssWrap({ selector: LIGHT_THEME }))
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/light'))
);
gulp.task('css-wrap-dark', () =>
gulp
.src(path.resolve('./theme/dark/index.css'))
.pipe(cssWrap({ selector: DARK_THEME }))
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/dark'))
);
gulp.task('css-wrap-blue', () =>
gulp
.src(path.resolve('./theme/blue/index.css'))
.pipe(cssWrap({ selector: BLUE_THEME }))
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/blue'))
);
gulp.task('css-wrap-green', () =>
gulp
.src(path.resolve('./theme/green/index.css'))
.pipe(cssWrap({ selector: GREEN_THEME }))
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/green'))
);
gulp.task('move-font-light', () =>
gulp
.src(['./theme/light/fonts/**'])
.pipe(gulp.dest('./src/assets/theme/light/fonts'))
);
gulp.task('move-font-dark', () =>
gulp
.src(['./theme/dark/fonts/**'])
.pipe(gulp.dest('./src/assets/theme/dark/fonts'))
);
gulp.task('move-font-blue', () =>
gulp
.src(['./theme/blue/fonts/**'])
.pipe(gulp.dest('./src/assets/theme/blue/fonts'))
);
gulp.task('move-font-green', () =>
gulp
.src(['./theme/green/fonts/**'])
.pipe(gulp.dest('./src/assets/theme/green/fonts'))
);
// gulp v4
// https://www.liquidlight.co.uk/blog/how-do-i-update-to-gulp-4/
gulp.task(
'light',
gulp.series(['css-wrap-light', 'move-font-light'], function(done) {
// default task code here
done();
})
);
gulp.task(
'dark',
gulp.series(['css-wrap-dark', 'move-font-dark'], function(done) {
// default task code here
done();
})
);
gulp.task(
'blue',
gulp.series(['css-wrap-blue', 'move-font-blue'], function(done) {
// default task code here
done();
})
);
gulp.task(
'green',
gulp.series(['css-wrap-green', 'move-font-green'], function(done) {
// default task code here
done();
})
);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/YiShengSuoAiDanDan/happy-coastal-city-dev.git
git@gitee.com:YiShengSuoAiDanDan/happy-coastal-city-dev.git
YiShengSuoAiDanDan
happy-coastal-city-dev
happy-coastal-city-dev
master

搜索帮助