diff options
| author | 2023-04-28 01:47:57 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:47:57 +0800 | |
| commit | 8b2c4a38a461ff5ecc95972291bc711e2c5dec9a (patch) | |
| tree | 29f552e3df949073e21bf5c76d7abc3044830ec6 /examples/with-rollup/packages/ui | |
| parent | fc8c5fdce62fb229202659408798a7b6c98f6e8b (diff) | |
| download | HydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.tar.gz HydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.zip | |
Diffstat (limited to 'examples/with-rollup/packages/ui')
| -rw-r--r-- | examples/with-rollup/packages/ui/Button.tsx | 5 | ||||
| -rw-r--r-- | examples/with-rollup/packages/ui/index.tsx | 2 | ||||
| -rw-r--r-- | examples/with-rollup/packages/ui/package.json | 23 | ||||
| -rw-r--r-- | examples/with-rollup/packages/ui/rollup.config.js | 10 | ||||
| -rw-r--r-- | examples/with-rollup/packages/ui/tsconfig.json | 5 |
5 files changed, 45 insertions, 0 deletions
diff --git a/examples/with-rollup/packages/ui/Button.tsx b/examples/with-rollup/packages/ui/Button.tsx new file mode 100644 index 0000000..3e5afc7 --- /dev/null +++ b/examples/with-rollup/packages/ui/Button.tsx @@ -0,0 +1,5 @@ +import * as React from "react"; + +export const Button = () => { + return <button>Boop</button>; +}; diff --git a/examples/with-rollup/packages/ui/index.tsx b/examples/with-rollup/packages/ui/index.tsx new file mode 100644 index 0000000..916730e --- /dev/null +++ b/examples/with-rollup/packages/ui/index.tsx @@ -0,0 +1,2 @@ +import * as React from "react"; +export * from "./Button"; diff --git a/examples/with-rollup/packages/ui/package.json b/examples/with-rollup/packages/ui/package.json new file mode 100644 index 0000000..0b3dd05 --- /dev/null +++ b/examples/with-rollup/packages/ui/package.json @@ -0,0 +1,23 @@ +{ + "name": "ui", + "version": "0.0.0", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "license": "MIT", + "scripts": { + "lint": "eslint *.ts*", + "build": "rollup --config", + "dev": "pnpm run build -- --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "^8.5.0", + "@types/react": "^18.0.34", + "@types/react-dom": "^17.0.11", + "eslint": "^7.32.0", + "eslint-config-custom": "workspace:*", + "react": "^18.2.0", + "rollup": "^2.79.0", + "tsconfig": "workspace:*", + "typescript": "^4.5.2" + } +} diff --git a/examples/with-rollup/packages/ui/rollup.config.js b/examples/with-rollup/packages/ui/rollup.config.js new file mode 100644 index 0000000..851f95f --- /dev/null +++ b/examples/with-rollup/packages/ui/rollup.config.js @@ -0,0 +1,10 @@ +import typescript from "@rollup/plugin-typescript"; + +export default { + input: "index.tsx", + output: { + file: "dist/index.js", + format: "cjs", + }, + plugins: [typescript()], +}; diff --git a/examples/with-rollup/packages/ui/tsconfig.json b/examples/with-rollup/packages/ui/tsconfig.json new file mode 100644 index 0000000..cd6c94d --- /dev/null +++ b/examples/with-rollup/packages/ui/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "tsconfig/react-library.json", + "include": ["."], + "exclude": ["dist", "build", "node_modules"] +} |
