Skip to content

Commit

Permalink
previous
Browse files Browse the repository at this point in the history
  • Loading branch information
artemis-prime committed Jan 22, 2024
1 parent 3228dec commit 2ab7ba5
Show file tree
Hide file tree
Showing 5 changed files with 1,086 additions and 89 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ yarn-error.log*
.turbo

.contentlayer
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo

**/dist

**/.npmrc
17 changes: 17 additions & 0 deletions packages/ui/esbuild.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import mdx from '@mdx-js/esbuild'
import esbuild from 'esbuild'
import { nodeExternalsPlugin } from 'esbuild-node-externals'

esbuild
.build({
entryPoints: ['./index.ts'],
outfile: 'dist/index.js',
bundle: true,
minify: true,
treeShaking: true,
platform: 'node',
format: 'cjs',
target: 'node14',
plugins: [nodeExternalsPlugin(), mdx()],
})
.catch(() => process.exit(1))
36 changes: 32 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
{
"name": "@luxdefi/ui",
"version": "0.1.0",
"version": "0.1.1",
"description": "Library that contains shared UI primitives, styles, and core types",
"main": "dist/index.js",
"publishConfig": {
"access": "public"
},
"license": "MIT",
"author": {
"name": "luxdefi",
"url": "https://twitter.com/luxdefi"
},
"repository": {
"type": "git",
"url": "https://github.com/luxdefi/ui.git",
"directory": "packages/ui"
},
"files": [
"dist"
],
"keywords": [
"components",
"ui",
"radix-ui",
"luxdefi"
],

"scripts": {
"build": "rm -rf dist && tsc",
"build": "rm -rf dist && node ./esbuild.mjs && tsc",
"tc": "tsc --noEmit",
"clean": "rm -rf dist && rm -rf node_modules"
},
"dependencies": {
"@hookform/resolvers": "^3.3.2",
"@next/mdx": "^13.5.6",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-label": "^2.0.2",
Expand All @@ -23,30 +47,34 @@
"lodash.merge": "^4.6.2",
"lucide-react": "^0.307.0",
"markdown-to-jsx": "^7.3.2",
"next-themes": "^0.2.1",
"postcss-selector-parser": "^6.0.13",
"react-device-detect": "^2.2.3",
"react-hook-form": "^7.47.0",
"react-social-icons": "^6.4.0",
"validator": "^13.11.0",
"zod": "**** re zod version: https://github.com/colinhacks/zod/issues/2663 **** ",
"zod": "3.21.4"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"next": "^14.0.4",
"next-themes": "^0.2.1",
"tailwind-merge": "^2.2.0",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.6",
"tailwindcss-interaction-media": "^0.1.0"
},
"devDependencies": {
"@mdx-js/esbuild": "^3.0.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@types/mdx": "^2.0.9",
"@types/node": "^20.10.7",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"autoprefixer": "^10.4.16",
"esbuild": "^0.17.19",
"esbuild-node-externals": "^1.12.0",
"postcss": "^8.4.33",
"postcss-import": "^16.0.0",
"typescript": "^5.3.3"
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
"name": "next"
}
],
// re emit settings: https://www.simonboisset.com/en/blog/publish-npm-library-with-esbuild
"compilerOptions": {
"target": "es2020",
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "./dist",
"jsx": "preserve",
"lib": [
Expand Down
Loading

0 comments on commit 2ab7ba5

Please sign in to comment.