mirror of
https://github.com/onyx-dot-app/onyx-ui.git
synced 2026-07-01 14:46:04 -04:00
Update exports again
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# dependencies (bun install)
|
||||
node_modules
|
||||
bun.lock
|
||||
dist
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
|
||||
@@ -2,6 +2,29 @@
|
||||
"name": "onyx-ui",
|
||||
"version": "1.0.0",
|
||||
"description": "The unified Onyx UI Component library",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./icons": {
|
||||
"types": "./dist/icons.d.ts",
|
||||
"import": "./dist/icons.mjs",
|
||||
"require": "./dist/icons.js"
|
||||
},
|
||||
"./text": {
|
||||
"types": "./dist/text.d.ts",
|
||||
"import": "./dist/text.mjs",
|
||||
"require": "./dist/text.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@types/bun": "latest",
|
||||
@@ -23,6 +46,8 @@
|
||||
"react": "^19.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"dev": "tsup --watch",
|
||||
"prepare": "husky",
|
||||
"lint": "eslint . --ext .ts,.tsx,.js,.jsx",
|
||||
"lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Export all icon components
|
||||
// Export all icon components and types
|
||||
export * from "./icons";
|
||||
|
||||
// Export Text component
|
||||
// Export Text component and types
|
||||
export { default as Text } from "./Text";
|
||||
export type { TextProps } from "./Text";
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
entry: {
|
||||
index: "src/index.ts",
|
||||
icons: "src/icons.tsx",
|
||||
text: "src/Text/index.tsx",
|
||||
},
|
||||
format: ["cjs", "esm"],
|
||||
dts: true,
|
||||
splitting: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
external: ["react"],
|
||||
treeshake: true,
|
||||
esbuildOptions(options) {
|
||||
options.jsx = "automatic";
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user