Skip to content

Commit

Permalink
feat: Update READMEs with Bun commands
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ryoppippi committed Jun 1, 2024
1 parent ed33385 commit 02d27a0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 67 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
3 changes: 3 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# unplugin-typia examples

This repository contains examples of using unplugin-typia.
41 changes: 5 additions & 36 deletions examples/sveltekit/README.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 4 additions & 3 deletions examples/vite-hono/README.md
Original file line number Diff line number Diff line change
@@ -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
```

33 changes: 5 additions & 28 deletions examples/vite-react/README.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions examples/vite-vanilla/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# unplugin-typia example for Vanilla + Vite

```sh
bun i && bun prepare
bun run build
```

0 comments on commit 02d27a0

Please sign in to comment.