Skip to content

nyxb/vite-template-react

Vite Template React

GitHub Release (latest by date) License

A Vite + React starter template.

Alt text

Development

To get a local copy of the code, use nyxbi cli:

npx nyxbi init -t vite-template-react my-app 

and follow the instructions. after that, you can run:

bun dev

And then open http://localhost:3000 to view it in the browser.

Available Scripts

In this project, you can run the following scripts:

Script Description
bun start Runs the app in the development mode.
bun test Launches the test runner in the interactive watch mode.
bun run build Builds the app for production to the dist folder.
bun run serve Serves the production build from the dist folder.
bun run test Runs tests with vitest.
bun run coverage Runs tests with code coverage

or you can simply use nyxi and just enter nyxr and select your script

install it with:

npm install -g @nyxb/nyxi

Folder Structure

No configuration or complicated folder structures, just the files you need to build your app:

vite-template-react ├── public │   ├── favicon.svg │   ├── react.svg │   ├── robots.txt │   ├── styled-component.svg │   ├── vite.svg │   └── vitest.svg ├── src │   ├── assets │   │   ├── react.svg │   │   ├── vite.svg │   │   └── vitest..svg │   ├── components │   │   ├── Avatar │   │   │   ├── Avatar.test.tsx │   │   │   ├── Avatar.tsx │   │   │   └── index.ts │   │   ├── Card │   │   │   ├── Card.tsx │   │   │   └── index.ts │   │   ├── GlobalStyle │   │   │   ├── GlobalStyle.tsx │   │   │   └── index.ts │   │   └── ImageLink │   │   ├── ImageLink.test.tsx │   │   ├── ImageLink.tsx │   │   └── index.ts │   ├── test │   │   ├── App.test.tsx │   │   └── setup.ts │   ├── App.tsx │   ├── constants.ts │   ├── index.tsx │   └── logo.svg ├── types │   ├── bun.env.d.ts │   ├── custom.d.ts │   └── vite-env.d.ts ├── LICENSE ├── README.md ├── bun.lockb ├── eslint.config.js ├── index.html ├── package.json ├── tsconfig.json ├── vite.config.ts └── vitest.config.ts 

Styleguide

For coding style, I use eslint along with my custom configuration, @nyxb/eslint-config.

Credits

Vite Template React is built and maintained by Nyxb.

License

This project is licensed under the terms of the MIT license.

About

A Vite + React + TS template

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project