Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunchee 2 #547

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@manypkg/cli": "^0.20.0",
"@types/node": "18.16.0",
"@uploadthing/eslint-config": "0.2.0",
"bunchee": "^4.3.3",
"dotenv": "latest",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
Expand Down
35 changes: 24 additions & 11 deletions packages/config/tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"composite": false,
"target": "ES2020",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"allowJs": true,
"checkJs": true,

"noEmit": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"removeComments": true,

"strict": true,
// "noFallthroughCasesInSwitch": true,
// "noImplicitOverride": true,
// "noImplicitReturns": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
// "useUnknownInCatchVariables": true,
// "noUncheckedIndexedAccess": true,

"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"moduleResolution": "node",
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true
},
"exclude": ["node_modules"]
"useDefineForClassFields": true
}
}
4 changes: 0 additions & 4 deletions packages/config/tsup/index.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions packages/config/tsup/index.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/config/tsup/package.json

This file was deleted.

24 changes: 17 additions & 7 deletions packages/dropzone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"./core": {
"types": "./dist/core.d.ts",
"import": "./dist/core.mjs",
"require": "./dist/core.js"
"require": "./dist/core.cjs"
},
"./solid": {
"types": "./dist/solid.d.ts",
"import": "./dist/solid.mjs",
"require": "./dist/solid.js"
"require": "./dist/solid.cjs"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.mjs",
"require": "./dist/react.js"
"require": "./dist/react.cjs"
}
},
"files": [
Expand All @@ -35,9 +35,9 @@
},
"scripts": {
"lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0",
"build": "tsup",
"build": "rm -rf dist && bunchee",
"clean": "git clean -xdf dist node_modules",
"dev": "tsup --watch",
"dev": "bunchee -w",
"typecheck": "tsc --noEmit"
},
"dependencies": {
Expand All @@ -48,13 +48,23 @@
"@types/react": "18.2.33",
"@uploadthing/eslint-config": "0.2.0",
"@uploadthing/tsconfig": "0.1.0",
"@uploadthing/tsup-config": "0.1.0",
"eslint": "^8.47.0",
"react": "18.2.0",
"solid-js": "^1.7.11",
"tsup": "6.7.0",
"typescript": "^5.1.6"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"solid-js": "^1.7.11"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"solid-js": {
"optional": true
}
},
"eslintConfig": {
"root": true,
"extends": [
Expand Down
13 changes: 0 additions & 13 deletions packages/dropzone/tsup.config.ts

This file was deleted.

10 changes: 4 additions & 6 deletions packages/mime-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"require": "./dist/index.cjs"
},
"./db": {
"types": "./dist/db.d.ts",
"import": "./dist/db.mjs",
"require": "./dist/db.js"
"require": "./dist/db.cjs"
}
},
"typesVersions": {
Expand All @@ -27,17 +27,15 @@
],
"scripts": {
"lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0",
"build": "tsup",
"build": "rm -rf dist && bunchee",
"clean": "git clean -xdf dist node_modules",
"dev": "tsup --watch",
"dev": "bunchee -w",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@uploadthing/eslint-config": "0.2.0",
"@uploadthing/tsconfig": "0.1.0",
"@uploadthing/tsup-config": "0.1.0",
"eslint": "^8.47.0",
"tsup": "6.7.0",
"typescript": "^5.1.6"
},
"publishConfig": {
Expand Down
12 changes: 0 additions & 12 deletions packages/mime-types/tsup.config.ts

This file was deleted.

13 changes: 5 additions & 8 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"require": "./dist/index.cjs"
},
"./hooks": {
"types": "./dist/hooks.d.ts",
"import": "./dist/hooks.mjs",
"require": "./dist/hooks.js"
"require": "./dist/hooks.cjs"
},
"./next-ssr-plugin": {
"types": "./dist/next-ssr-plugin.d.ts",
"import": "./dist/next-ssr-plugin.mjs",
"require": "./dist/next-ssr-plugin.js"
"require": "./dist/next-ssr-plugin.cjs"
}
},
"files": [
Expand All @@ -37,7 +37,8 @@
"scripts": {
"lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0",
"clean": "git clean -xdf dist node_modules",
"build": "tsup",
"build:tw": "tailwindcss -i ./src/styles.css -o ./dist/index.css",
"build": "rm -rf dist && bunchee && npm run build:tw",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
Expand Down Expand Up @@ -66,14 +67,10 @@
"@types/react-dom": "18.2.14",
"@uploadthing/eslint-config": "0.2.0",
"@uploadthing/tsconfig": "0.1.0",
"@uploadthing/tsup-config": "0.1.0",
"autoprefixer": "10.4.14",
"eslint": "^8.47.0",
"next": "14.0.1",
"postcss": "8.4.31",
"react": "18.2.0",
"tailwindcss": "^3.3.2",
"tsup": "6.7.0",
"typescript": "^5.1.6",
"uploadthing": "6.1.1",
"vitest": "^0.30.1",
Expand Down
6 changes: 0 additions & 6 deletions packages/react/postcss.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/react/src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { useEffect, useRef, useState } from "react";
import { twMerge } from "tailwind-merge";

Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/dropzone.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { useCallback, useEffect, useState } from "react";
import { twMerge } from "tailwind-merge";

Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

export { generateReactHelpers } from "./useUploadThing";

export { useDropzone } from "@uploadthing/dropzone/react";
2 changes: 0 additions & 2 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "./styles.css";

export {
UploadButton,
UploadDropzone,
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/next-ssr-plugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { useId } from "react";
import { useServerInsertedHTML } from "next/navigation";

Expand Down
83 changes: 0 additions & 83 deletions packages/react/tailwind.config.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions packages/react/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { Config } from "tailwindcss";

export default {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
corePlugins: {
preflight: false,
},
} satisfies Config;
Loading
Loading