Commit 04a1533a authored by vince's avatar vince
Browse files

refactor: splitting and reorganizing style files

parent 414a639d
......@@ -16,6 +16,3 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"version": "0.2.0",
"configurations": [
{
"type": "chrome", // chrome、edge
"name": "vben admin pro dev", // 调试的名称,可以自定义
"request": "launch",
"url": "http://localhost:5173",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-antd/src"
}
]
......
......@@ -60,7 +60,6 @@
},
"files.exclude": {
"**/.editorconfig": true,
"**/.eslintcache": true,
"**/bower_components": true,
"**/.turbo": true,
......
import { createApp } from 'vue';
import '@vben/styles';
import '@vben/styles/antd';
import { preferences } from '@vben-core/preferences';
import { loadMessages, setupI18n } from '#/locales';
......
......@@ -26,7 +26,7 @@ export async function perfectionist(): Promise<Linter.FlatConfig[]> {
vue: 'vue',
},
value: {
vben: ['@vben*', '@vben/*', '@vben-core/*'],
vben: ['@vben*', '@vben/**/**', '@vben-core/**/**'],
vue: ['vue', 'vue-*', '@vue*'],
},
},
......
......@@ -37,6 +37,8 @@
},
"./postcss": {
"types": "./src/postcss.config.ts",
"import": "./dist/postcss.config.mjs",
"require": "./dist/postcss.config.cjs",
"default": "./dist/postcss.config.mjs"
},
"./*": "./*"
......
/* https://gavin-yyc.github.io/colorconvert/ */
:root {
--font-geist-sans: 'geist-sans', -apple-system, blinkmacsystemfont, 'Segoe UI',
roboto, helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
/* Default background color of <body />...etc */
--background: 0 0 100%;
--foreground: 210 6% 21%;
......
import { defineBuildConfig } from 'unbuild';
export default defineBuildConfig({
clean: true,
declaration: true,
entries: [
{
builder: 'mkdist',
input: './src',
loaders: ['sass'],
outDir: './dist',
pattern: ['index.scss'],
},
{
builder: 'mkdist',
input: './src',
loaders: ['postcss'],
outDir: './dist',
pattern: ['tailwind.css'],
},
],
});
......@@ -11,25 +11,31 @@
"license": "MIT",
"type": "module",
"scripts": {
"build": "pnpm unbuild",
"prepublishOnly": "npm run build",
"stub": "pnpm unbuild --stub"
"build": "pnpm vite build",
"prepublishOnly": "npm run build"
},
"files": [
"dist",
"src"
],
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"exports": {
".": {
"development": "./src/scss/index.scss",
"default": "./dist/index.css"
},
"./tailwind": {
"development": "./src/tailwind.css",
"default": "./dist/tailwind.css"
"./bem": {
"development": "./src/scss-bem/bem.scss",
"default": "./dist/bem.scss"
},
"./global": {
"default": "./src/scss/global.scss"
".": {
"types": "./src/index.ts",
"development": "./src/index.ts",
"default": "./dist/index.mjs"
}
},
"publishConfig": {
"exports": {
".": {
"default": "./dist/index.mjs"
}
}
},
"dependencies": {
......
@import './scss/index';
import './scss/index.scss';
import './css/tailwind.css';
import './css/nprogress.css';
export {};
@forward './common/constants.scss';
@forward './constants.scss';
@mixin b($block) {
$B: $namespace + '-' + $block !global;
......
#app,
.ant-app,
body,
html {
width: 100%;
......@@ -7,10 +6,6 @@ html {
overscroll-behavior: none;
}
.ant-app {
color: inherit;
}
*,
::after,
::before {
......
/** css 样式重置 */
@import 'modern-normalize/modern-normalize.css';
@import './common/base';
@import './base';
@import './transition';
import { defineConfig } from '@vben/vite-config';
export default defineConfig({
vite: {
publicDir: 'src/scss-bem',
},
});
......@@ -58,7 +58,7 @@ function handleMouseenter(menu: MenuRecordRaw) {
</ul>
</template>
<style lang="scss" scoped>
@import '@vben-core/design/global';
@import '@vben-core/design/bem';
@include b('normal-menu') {
--menu-item-margin-y: 4px;
......
@import '@vben-core/design/global';
@import '@vben-core/design/bem';
.#{$namespace}-menu__popup-container,
.#{$namespace}-menu {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment