-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
3,483 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ Desktop.ini | |
|
||
# 忽略 maven 和 gradle 的相关文件 | ||
target/ | ||
build/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.next | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from "@vitejs/plugin-vue" | ||
import { resolve } from "path" | ||
import dts from 'vite-plugin-dts' | ||
import { filter, map } from "lodash-es" | ||
import {readdirSync} from "node:fs"; | ||
|
||
function getDirectoriesSync(basePath: string) { | ||
const entries = readdirSync(basePath, { withFileTypes: true }) | ||
|
||
return map( | ||
filter(entries, (entry) => entry.isDirectory()), | ||
(entry) => entry.name | ||
) | ||
} | ||
|
||
export default defineConfig({ | ||
plugins: [vue(), dts({ | ||
tsconfigPath: "../../tsconfig.build.json", | ||
outDir: "./dist/types" | ||
}) as any], | ||
build: { | ||
outDir: './dist/es', | ||
lib: { | ||
entry: resolve(__dirname, "../index.ts"), | ||
name: "BreezeUi", | ||
fileName: "index", | ||
formats: ["es"] | ||
}, | ||
rollupOptions: { | ||
external: [ | ||
"vue", | ||
"@fortawesome/fontawesome-svg-core", | ||
"@fortawesome/free-solid-svg-icons", | ||
"@fortawesome/vue-fontawesome", | ||
"@popperjs/core", | ||
"async-validator", | ||
], | ||
output: { | ||
assetFileNames: (assetInfo) => { | ||
if (assetInfo.name === "style.css") { | ||
return "index.css" | ||
} | ||
return assetInfo.name as string | ||
}, | ||
manualChunks(id) { | ||
if (id.includes("node_modules")) { | ||
return "vendor" | ||
} | ||
if(id.includes("packages/hooks")) { | ||
return "hooks" | ||
} | ||
if(id.includes("packages/utils") || id.includes("plugin-vue:export-helper")) { | ||
return "utils" | ||
} | ||
// 按组件分包 | ||
for(const item of getDirectoriesSync("../components")) { | ||
if(id.includes(`/packages/components/${item}`)) { | ||
return item | ||
} | ||
} | ||
} | ||
}, | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from "@vitejs/plugin-vue" | ||
import { resolve } from "path" | ||
|
||
export default defineConfig({ | ||
plugins: [vue()], | ||
build: { | ||
outDir: './dist/umd', | ||
lib: { | ||
entry: resolve(__dirname, "../index.ts"), | ||
name: "BreezeUi", | ||
fileName: "index", | ||
formats: ["umd"] | ||
}, | ||
rollupOptions: { | ||
external: ["vue"], | ||
output: { | ||
exports: "named", | ||
globals: { | ||
vue: "Vue" | ||
}, | ||
assetFileNames: (assetInfo) => { | ||
if (assetInfo.name === "style.css") { | ||
return "index.css" | ||
} | ||
return assetInfo.name as string | ||
} | ||
} | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,53 @@ | ||
{ | ||
"name": "breeze-ui", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"description": "Components library for Breeze UI", | ||
"type": "module", | ||
"files": ["dist"], | ||
"sideEffects": ["./dist/index.css"], | ||
"main": "./dist/umd/index.umd.cjs", | ||
"module": "./dist/es/index.js", | ||
"types": "./dist/types/core/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types/core/index.d.ts", | ||
"import": "./dist/es/index.js", | ||
"require": "./dist/umd/index.umd.cjs" | ||
}, | ||
"./dist": { | ||
"import": "./dist/", | ||
"require": "./dist/" | ||
}, | ||
"./dist/index.css": { | ||
"import": "./dist/index.css", | ||
"require": "./dist/index.css" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "run-s clean build-only move-style", | ||
"build-only": "run-p build-esm build-umd", | ||
"build-umd": "vite build --config ./build/vite.umd.config.ts", | ||
"build-esm": "vite build --config ./build/vite.es.config.ts", | ||
"move-style": "move-file dist/es/index.css dist/index.css", | ||
"clean": "rimraf dist", | ||
"release": "release-it" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@fortawesome/fontawesome-svg-core": "^6.5.1", | ||
"@fortawesome/free-solid-svg-icons": "^6.5.1", | ||
"@fortawesome/vue-fontawesome": "^3.0.6", | ||
"@popperjs/core": "^2.11.8", | ||
"async-validator": "^4.2.5" | ||
}, | ||
"devDependencies": { | ||
"vite-plugin-dts": "^3.9.1", | ||
"@breeze-ui/components": "workspace:*" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
"peerDependencies": { | ||
"vue": "^3.4.19" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import BreezeUi from "breeze-ui" | ||
import BreezeUi from "breeze-ui" | ||
import "breeze-ui/dist/index.css" | ||
|
||
createApp(App).use(BreezeUi).mount('#app') |
Oops, something went wrong.