From 02d27a08eeaf8217dba41c1aca3f0b6ca9d969e1 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Sat, 1 Jun 2024 14:04:06 +0100 Subject: [PATCH] feat: Update READMEs with Bun commands This commit updates the README files in the repository and examples folders. The changes include replacing npm commands with Bun commands for consistency and ease of use. This change affects the main README and the READMEs in the examples folders for SvelteKit, Hono + Vite, React + Vite, and Vanilla + Vite. --- README.md | 6 +++++ examples/README.md | 3 +++ examples/sveltekit/README.md | 41 ++++----------------------------- examples/vite-hono/README.md | 7 +++--- examples/vite-react/README.md | 33 ++++---------------------- examples/vite-vanilla/README.md | 6 +++++ 6 files changed, 29 insertions(+), 67 deletions(-) create mode 100644 examples/README.md create mode 100644 examples/vite-vanilla/README.md diff --git a/README.md b/README.md index 69af3cd9..568da314 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,9 @@ This is the monorepo of `unplugin-typia` - [unplugin-typia](./packages/unplugin-typia/README.md) - [examples](./examples) + +This repository is managed by [Bun](bun.sh) + +```sh +bun i --frozen-lockfile +``` diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..fda5d33e --- /dev/null +++ b/examples/README.md @@ -0,0 +1,3 @@ +# unplugin-typia examples + +This repository contains examples of using unplugin-typia. diff --git a/examples/sveltekit/README.md b/examples/sveltekit/README.md index 5ce67661..bf557cb4 100644 --- a/examples/sveltekit/README.md +++ b/examples/sveltekit/README.md @@ -1,38 +1,7 @@ -# create-svelte +# unplugin-typia example for SvelteKit -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app +```sh +bun i && bun prepare +bun dev --open +bun run build ``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/examples/vite-hono/README.md b/examples/vite-hono/README.md index 5c119820..a404748d 100644 --- a/examples/vite-hono/README.md +++ b/examples/vite-hono/README.md @@ -1,5 +1,6 @@ +# unplugin-typia example for Hono + Vite ```txt -npm install -npm run dev +bun i && bun prepare +bun run dev +bun run build ``` - diff --git a/examples/vite-react/README.md b/examples/vite-react/README.md index 0d6babed..338c19f0 100644 --- a/examples/vite-react/README.md +++ b/examples/vite-react/README.md @@ -1,30 +1,7 @@ -# React + TypeScript + Vite +# unplugin-typia example for React + Vite -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: - -- Configure the top-level `parserOptions` property like this: - -```js -export default { - // other rules... - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], - tsconfigRootDir: __dirname, - }, -} +```sh +bun i && bun prepare +bun dev --open +bun run build ``` - -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/examples/vite-vanilla/README.md b/examples/vite-vanilla/README.md new file mode 100644 index 00000000..664f74f2 --- /dev/null +++ b/examples/vite-vanilla/README.md @@ -0,0 +1,6 @@ +# unplugin-typia example for Vanilla + Vite + +```sh +bun i && bun prepare +bun run build +```