React-Rescript Template
An opionionated React Project Template with Rescript!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
An extremely opinionated template for building React applications with Rescript. Focus on the application itself rather than all these low-level configuration stuffs.
Incentives:
- Wanted to try out Rescript
- Don't want to use
create-react-app
- Don't want to use Next.js
- Buitl this React template so I can use for other projects.
Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed to expanding this template!
Built With
The technologies and tools used within this template.
- React
- Esbuild
- Rescript
- TailwindCSS
Getting Started
Prerequisites
The list of tools that is used when development.
- npm
npm install npm@latest -g
- Pnpm
npm i -g pnpm
- Git
Installation
To use this template for personal use or contribution, simply perform the following. A total of 3 terminals are required to get 3 of the core components of application up and running for development. However, it is possible to start all the necessary processes with one terminal by using pnpm dev
as shown on step 4.
- Clone the repo
git clone https://github.com/data-miner00/react-rescript-template.git
- Install Node dependencies
pnpm i
- Optionally update the dependencies
pnpm up --latest
- Start Esbuild, Tailwind JIT and local dev server concurrently. Skip 5,6,7, 8
pnpm dev
- Start Rescript watcher (requires 1 terminal)
pnpm watch:res
- Start Tailwind JIT (requires 1 terminal)
pnpm watch:tw
- Start Esbuild (requires 1 terminal)
pnpm watch:esb
- Finally start local dev server (requires 1 terminal)
pnpm start
- Compile for production
pnpm build
- Purge dist folder
pnpm purge
Roadmap
- Add Rescript
- Add 404 page
- Add Styling
- Sass
- Tailwind
- Dark mode
- Add PWA Manifest
- Responsive styles
- Mobile Sidebar
- New features page
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgments
List of resources that are helpful and would like to give credit to.