reactivize
v1.1.4
Published
A CLI tool to generate a new React project with optional configurations.
Downloads
9
Maintainers
Readme
Reactivize
Reactivize is a modern and flexible alternative to Create React App that allows you to generate a fully configured React project with just a single command. It's the result of my personal experience and preference for creating React projects using Webpack. I found that this approach offered a more streamlined and efficient development experience compared to Create React App, and I wanted to share this powerful tool with the community.
Why Reactivize? 🤔
Reactivize offers several advantages over Create React App, making it an attractive option for developers looking to start a new project:
Modern Directory Structure: Reactivize follows best practises for organising project files, making it easier to navigate and maintain your codebase.
Webpack for Production: Reactivize uses Webpack to minify and bundle your project for production, ensuring optimal performance and smaller bundle sizes.
Font Awesome Support: Reactivize comes with built-in support for Font Awesome, a popular icon library, making it easy to add icons and improve the visual appeal of your project.
Flexible Configuration: Reactivize allows you to customise your project setup, including optional support for TypeScript, Redux, and React Router. This makes it easy to tailor the project to your specific needs and preferences.
Installation
Reactivize can be installed globally using npm:
npm install -g reactivize
Usage
To create a new React project with Reactivize, run the following command:
reactivize my-project -nt
#or
npx reactivize my-project -nt
cd my-project
npm start
This will create a new directory called my-project
with a directory structure that I've used over the years while working with various types of projects. The structure is organised in a way that allows you to easily manage your code and keep everything organised. .
You can always get help by running
reactivize -h
In addition, I used ChatGPT's help to make my logger message funny by adding a twist that might surprise the user. So, you can expect a little bit of humour while using Reactivize.
Features
Webpack: Reactivize uses Webpack to bundle your files, providing greater flexibility and customization options than the built-in react-scripts used by create-react-app.
Directory Structure: The directory structure generated by Reactivize is intuitive and easy to navigate, making it easier to organise your code.
Router and Reducer: Reactivize comes with built-in support for routers and reducers, making it easier to manage complex projects.
Customizable: With Reactivize, you can easily customise your Webpack configuration to suit your project's specific needs.
Future TypeScript Support: Reactivize is actively developing support for TypeScript, making it an ideal choice for projects using TypeScript.
Getting Started
Once you've created a new project using Reactivize, you can start editing your files in the "src" directory. You can start the development server using "npm start." The app will be available at http://localhost:8080/
.
In addition, Reactivize comes with pre-configured scripts that make it easy to build and deploy your project. You can use npm run build
to create a production-ready build of your project, and npm run deploy
to deploy your project to a hosting provider like Netlify or Heroku.
Directory Structure
my-project/
├── node_modules/
├── public/
│ ├── index.html
│ ├── favicon.ico
│ └── manifest.json
├── src/
│ ├── assets/
│ │ ├── fonts/
│ │ ├── images/
│ ├── components/
│ ├── pages/
│ ├── store/
│ │ ├── reducers/
│ │ ├── actions/
│ │ ├── constants/
│ │ ├── middlewares/
│ │ index.js
│ ├── config/
│ ├── utils/
│ ├── index.jsx
│ └── index.css
├── .gitignore
├── package.json
└── webpack.config.js
└── babel.config.js
node_modules/
: This directory contains all the dependencies installed by npm.public/
: This directory contains the public assets of your app such asindex.html
,favicon.ico
, andmanifest.json
.src/
: This directory contains all the source code of your app.assets/
: This directory contains all the static assets such as fonts, images, and styles.fonts/
: This directory contains all the font files used in your app.images/
: This directory contains all the image files used in your app.components/
: This directory contains all the reusable UI components of your app.utils/
: This directory contains all the reusable util methods for your appconfig/
: This directory contains all the global config for your appstyles/
: This directory contains all the stylesheets used in your apppages/
: This directory contains all the pages of your app.store/
: This directory contains all the Redux reducers,actions,middlewares and constants of your app.index.jsx
: This file renders the React app and mounts it to the DOM.index.css
: This file contains the root css style used in the app..gitignore
: This file contains a list of files and directories that should be ignored by Git..eslintignore
: This file contains a list of files and directories that should be ignored by Eslint.package.json
: This file contains the metadata of your app and the list of dependencies.webpack.config.js
: This file contains the Webpack configuration of your app.babel.config.js
: This file contains the Babel configuration of your app..eslintrc
: This file contains the ESLint configuration of your app..prettierrc
: This file contains the Prettier configuration of your app.
This directory structure is designed to make it easy to organize your code and keep everything in its place. By default, Reactivize comes with pre-configured folders for static assets, components, pages, reducers, and routers, making it easy to manage complex projects.
Contribution
Contributions to Reactivize are always welcome! If you've found a bug or have a feature request, please open an issue on the GitHub repository. Pull requests are also welcome, and any help improving the project is greatly appreciated.
Before submitting a pull request, please make sure that your code adheres to the project's coding style guidelines.
Read more at [Guidelines] (https://github.com/J3rry320/reactivize/blob/main/CONTRIBUTING.md)
Hire me
If you're looking for a skilled React developer, I'm available for hire! I have years of experience building web applications using React, and I'm always looking for new projects to work on. Whether you need a full-stack developer or a front-end specialist, I can help you build the perfect solution for your business.
Please feel free to reach out to me at [my mail] (mailto:[email protected]) to discuss your project in more detail.
Learn more
If you're interested in learning more about Reactivize or React development in general, there are a number of great resources available online. Here are a few that I would recommend:
React Documentation - The official documentation for React.
Webpack Documentation - The official documentation for Webpack.
Redux Documentation - The official documentation for Redux.
React Router Documentation - The official documentation for React Router.
In addition, there are many great blogs, tutorials, and video courses available online that can help you learn React and build great applications. Some of my personal favorites include:
React Rocks - A curated collection of React components and resources.
Egghead.io - A collection of video courses on React, Redux, and more.
React Training - A collection of in-depth React workshops and courses.
Conclusion
Thank you for considering Reactivize for your next React project. With its intuitive directory structure, built-in support for router and reducer, and flexibility provided by Webpack, I believe it's a great choice for any React project. If you have any questions or feedback, please don't hesitate to reach out to me.
Future Enhancements 💡
Reactivize is under active development, and we have plans to add more features and improvements in the future, including:
TypeScript Support: We are working on adding support for TypeScript, making it even easier to create projects with strong typing and an improved developer experience.
Webpack Support: We plan to further enhance our Webpack configuration, providing more optimisations and customization options for developers.
Jest and enzyme support: We plan to further enhance our generator to make sure you can write unit and integration tests for your app.
Licence 📄
Reactivize is licenced under the MIT Licence.
Support
If you find Reactivize helpful, please consider leaving a ⭐️ star on the GitHub repository. Your support is greatly appreciated!
Buy me a coffee
If you'd like to further support the development of Reactivize, you can buy me a coffee ☕. Every coffee helps me stay energized and committed to maintaining and improving the project. Thank you!