3 Star 15 Fork 6

逍遥僧/electron-vue-ant

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
themer.js 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
逍遥僧 提交于 2021-03-11 09:01 . v0.0.1 release
const path = require("path");
const { generateTheme, getLessVars } = require("antd-theme-generator");
// ant-design-vue/dist/antd.less
const options = {
antDir: path.join(__dirname, "./node_modules/ant-design-vue"), //对应具体位置
stylesDir: path.join(__dirname, "./src/assets/theme"), //对应具体位置
varFile: path.join(__dirname, "./src/assets/theme/var.less"), //对应具体位置
mainLessFile: path.join(__dirname, "./src/assets/theme/index.less"), //对应具体位置
themeVariables: [
"@primary-color",
"@body-background",
"@text-color",
"@text-color-secondary",
"@heading-color",
"@my-statusbg",
"@component-background",
"@border-color-base",
"@border-color-split",
"@background-color-light",
"@background-color-base",
"@error-color",
"@btn-primary-bg",
"@disabled-color",
"@item-active-bg",
"@item-hover-bg",
],
indexFileName: "index.html",
outputFilePath: path.join(__dirname, "./public/color.less"),
};
generateTheme(options)
.then((less) => {
console.log("Theme generated successfully");
})
.catch((error) => {
console.log("Error", error);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xiaoyaoseng/electron-vue-ant.git
[email protected]:xiaoyaoseng/electron-vue-ant.git
xiaoyaoseng
electron-vue-ant
electron-vue-ant
master

搜索帮助