feat 模版调整

This commit is contained in:
Wang Kejun 2023-10-31 17:45:21 +08:00
parent 62d79316cd
commit f83c1a5d50
4 changed files with 2 additions and 199 deletions

View File

@ -56,13 +56,12 @@ function getClientEnvironment() {
// Useful for determining whether were running in production mode. // Useful for determining whether were running in production mode.
// Most importantly, it switches React into the correct mode. // Most importantly, it switches React into the correct mode.
NODE_ENV: process.env.NODE_ENV || 'development', NODE_ENV: process.env.NODE_ENV || 'development',
// process.env.OAK_PLATFORM: wechatMp | wechatPublic | web | node // process.env.OAK_PLATFORM: wechatMp | web | node
OAK_PLATFORM: 'wechatMp', OAK_PLATFORM: 'wechatMp',
} }
); );
// Stringify all values so we can feed into webpack DefinePlugin // Stringify all values so we can feed into webpack DefinePlugin
const stringified = { const stringified = {
__DEV__: raw.NODE_ENV === 'development',
'process.env': Object.keys(raw).reduce((env, key) => { 'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]); env[key] = JSON.stringify(raw[key]);
return env; return env;

View File

@ -88,13 +88,12 @@ function getClientEnvironment(publicUrl) {
// Whether or not react-refresh is enabled. // Whether or not react-refresh is enabled.
// It is defined here so it is available in the webpackHotDevClient. // It is defined here so it is available in the webpackHotDevClient.
FAST_REFRESH: process.env.FAST_REFRESH !== 'false', FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
// process.env.OAK_PLATFORM: wechatMp | wechatPublic | web | node // process.env.OAK_PLATFORM: wechatMp | web | node
OAK_PLATFORM: 'web', OAK_PLATFORM: 'web',
} }
); );
// Stringify all values so we can feed into webpack DefinePlugin // Stringify all values so we can feed into webpack DefinePlugin
const stringified = { const stringified = {
__DEV__: raw.NODE_ENV === 'development',
'process.env': Object.keys(raw).reduce((env, key) => { 'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]); env[key] = JSON.stringify(raw[key]);
return env; return env;

View File

@ -1,194 +0,0 @@
:root[theme-color=cyan] {
--td-brand-color: #0594fa;
--td-brand-color-1: #d7eefe;
--td-brand-color-2: #aeddfd;
--td-brand-color-3: #84cafd;
--td-brand-color-4: #58b8fc;
--td-brand-color-5: #29a4fb;
--td-brand-color-6: #0594fa;
--td-brand-color-7: #29a4fb;
--td-brand-color-8: #0594fa;
--td-brand-color-9: #0378df;
--td-brand-color-10: #01409b;
}
:root[theme-color=green] {
--td-brand-color-1: #e8f8f2;
--td-brand-color-2: #bcebdc;
--td-brand-color-3: #85dbbe;
--td-brand-color-4: #48c79c;
--td-brand-color-5: #00a870;
--td-brand-color-6: #078d5c;
--td-brand-color-7: #067945;
--td-brand-color-8: #00a870;
--td-brand-color-9: #044f2a;
--td-brand-color-10: #033017;
}
:root[theme-color=yellow] {
--td-brand-color: #ebb105;
--td-brand-color-1: #fde9ab;
--td-brand-color-2: #fbd152;
--td-brand-color-3: #ebb105;
--td-brand-color-4: #dda204;
--td-brand-color-5: #ca8d03;
--td-brand-color-6: #b67803;
--td-brand-color-7: #fbd152;
--td-brand-color-8: #ebb105;
--td-brand-color-9: #dda204;
--td-brand-color-10: #603100;
}
:root[theme-color=orange] {
--td-brand-color-1: #fce5d7;
--td-brand-color-2: #f8cdaf;
--td-brand-color-3: #f4b285;
--td-brand-color-4: #f19659;
--td-brand-color-5: #ed7b2f;
--td-brand-color-6: #e75510;
--td-brand-color-7: #f19659;
--td-brand-color-8: #ed7b2f;
--td-brand-color-9: #e75510;
--td-brand-color-10: #7f0a02;
--td-brand-color: #ed7b2f;
}
:root[theme-color=red] {
--td-brand-color: #e34d59;
--td-brand-color-1: #fbe5e7;
--td-brand-color-2: #f7ccd0;
--td-brand-color-3: #f3b2b8;
--td-brand-color-4: #ef989f;
--td-brand-color-5: #ea7b84;
--td-brand-color-6: #e34d59;
--td-brand-color-7: #ea7b84;
--td-brand-color-8: #e34d59;
--td-brand-color-9: #e42c3a;
--td-brand-color-10: #8d0309;
}
:root[theme-color=pink] {
--td-brand-color: #ed49b4;
--td-brand-color-1: #fce5f4;
--td-brand-color-2: #facae9;
--td-brand-color-3: #f7aede;
--td-brand-color-4: #f491d2;
--td-brand-color-5: #f172c5;
--td-brand-color-6: #ed49b4;
--td-brand-color-7: #f172c5;
--td-brand-color-8: #ed49b4;
--td-brand-color-9: #e80f9d;
--td-brand-color-10: #8f025e;
}
:root[theme-color=purple] {
--td-brand-color: #834ec2;
--td-brand-color-1: #eee6f7;
--td-brand-color-2: #ddceee;
--td-brand-color-3: #ccb6e6;
--td-brand-color-4: #bb9edc;
--td-brand-color-5: #ab87d5;
--td-brand-color-6: #9a6fce;
--td-brand-color-7: #9a6fce;
--td-brand-color-8: #834ec2;
--td-brand-color-9: #783ac3;
--td-brand-color-10: #4c1397;
}
:root[theme-color=cyan][theme-mode=dark] {
--td-brand-color: #29a4fb;
--td-brand-color-1: #01409b;
--td-brand-color-2: #0152b3;
--td-brand-color-3: #0264ca;
--td-brand-color-4: #0378df;
--td-brand-color-5: #0594fa;
--td-brand-color-6: #29a4fb;
--td-brand-color-7: #0594fa;
--td-brand-color-8: #29a4fb;
--td-brand-color-9: #58b8fc;
--td-brand-color-10: #d7eefe;
}
:root[theme-color=green][theme-mode=dark] {
--td-brand-color: #03a56f;
--td-brand-color-1: #024b15;
--td-brand-color-2: #03965c;
--td-brand-color-3: #03a56f;
--td-brand-color-4: #04c383;
--td-brand-color-5: #03965c;
--td-brand-color-6: #03a56f;
--td-brand-color-7: #04c383;
--td-brand-color-8: #03a56f;
--td-brand-color-9: #05eb9f;
--td-brand-color-10: #91fdd9;
}
:root[theme-color=yellow][theme-mode=dark] {
--td-brand-color: #ca8d03;
--td-brand-color-1: #603100;
--td-brand-color-2: #764101;
--td-brand-color-3: #8c5201;
--td-brand-color-4: #a16502;
--td-brand-color-5: #b67803;
--td-brand-color-6: #ca8d03;
--td-brand-color-7: #764101;
--td-brand-color-8: #ca8d03;
--td-brand-color-9: #a16502;
--td-brand-color-10: #fde9ab;
}
:root[theme-color=orange][theme-mode=dark] {
--td-brand-color: #ed7b2f;
--td-brand-color-1: #692204;
--td-brand-color-2: #873105;
--td-brand-color-3: #a24006;
--td-brand-color-4: #c25110;
--td-brand-color-5: #d66724;
--td-brand-color-6: #ed8139;
--td-brand-color-7: #ff9852;
--td-brand-color-8: #ed7b2f;
--td-brand-color-9: #ed7b2f;
--td-brand-color-10: #fce5d7;
}
:root[theme-color=red][theme-mode=dark] {
--td-brand-color: #fb6e77;
--td-brand-color-1: #4f3335;
--td-brand-color-2: #960627;
--td-brand-color-3: #b01c37;
--td-brand-color-4: #c9384a;
--td-brand-color-5: #e35661;
--td-brand-color-6: #fb6e77;
--td-brand-color-7: #ff9195;
--td-brand-color-8: #fb6e77;
--td-brand-color-9: #ffd6d8;
--td-brand-color-10: #fff2f2;
}
root[theme-color=pink][theme-mode=dark] {
--td-brand-color: #ff70cf;
--td-brand-color-1: #5b374f;
--td-brand-color-2: #9b066d;
--td-brand-color-3: #bc088a;
--td-brand-color-4: #d435a0;
--td-brand-color-5: #ed53b7;
--td-brand-color-6: #ff70cf;
--td-brand-color-7: #ff99e4;
--td-brand-color-8: #ff70cf;
--td-brand-color-9: #ffdbfd;
--td-brand-color-10: #fff2ff;
}
root[theme-color=purple][theme-mode=dark] {
--td-brand-color: #ab87d5;
--td-brand-color-1: #4c1397;
--td-brand-color-2: #6325b0;
--td-brand-color-3: #783ac3;
--td-brand-color-4: #834ec2;
--td-brand-color-5: #9a6fce;
--td-brand-color-6: #ab87d5;
--td-brand-color-7: #ab87d5;
--td-brand-color-8: #ab87d5;
--td-brand-color-9: #ccb6e6;
--td-brand-color-10: #eee6f7;
}

View File

@ -1,2 +1 @@
@import '@project/config/styles/web/index.less'; // 少量公共样式 @import '@project/config/styles/web/index.less'; // 少量公共样式
@import '@project/config/styles/web/theme.less';