Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishubham21/flash-generate
Creat-react-app is great but slow :( I created this CLI tool to generate React applications with custom Webpack and Babel configurations - It's blazing fast (I have tested!)
https://github.com/ishubham21/flash-generate
Last synced: 1 day ago
JSON representation
Creat-react-app is great but slow :( I created this CLI tool to generate React applications with custom Webpack and Babel configurations - It's blazing fast (I have tested!)
- Host: GitHub
- URL: https://github.com/ishubham21/flash-generate
- Owner: ishubham21
- License: mit
- Created: 2022-02-10T06:54:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-07T13:19:17.000Z (almost 3 years ago)
- Last Synced: 2025-01-10T09:23:56.096Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 105 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Flash Generate (NPM package)
Find the package here - [flash-generate NPM package](https://www.npmjs.com/package/flash-generate)
## Introduction
Create-React-App is a great way to get started with React applications without having to worry about webpack, babel, and other build dependencies, but getting started with it takes a lot of time!
With our lives moving fast, slow installation of dependencies & a relatively slow build time (for both production and development environment) was really a turn-off for me. I wanted to be able to produce React templates quickly. So, I made a beginner-friendly react template generator called **Flash**. Flash covers all the major things required in a React application along with optimized build (production and development) times and efficient debugging using source maps.
Any beginner can get started with the React templates in a very short time!
## Disadvantages of CRA (Create-React-App)
Read more about the disadvantages of Create-React-App and the need to create Flash from [here](CRADisadvantages.md)
## Advantages of Flash-Generate
* **It's Fast!** - Don't believe me? Give it a try!
* **No Abstraction** - Everything's in front of you. Want to extend the application? Sure, go ahead! Want to change the `port`? Why not? Want to further optimize production build? Do it!
* **Yarn over NPM** - Flash makes use of Yarn to install dependencies! YARN is almost twice as fast as NPM because it parallelizes operations to maximize resource utilization so install times are much faster. The great part is that YARN is caching everything. It means highly-optimized build times the second time use **Flash**.
* **Everything that a basic React application needs** - Worried about having to include support for `favicon`, `manifest.json`, `file-loaders` in Webpack configuration for the production builds? I have got you covered! You get most of the things that a CRA gives you at a relatively faster pace!
* **Work with the latest version of React!** - I have made use of `plugin-transform-react-jsx` plugin over `@babel/preset-react` to make sure that the user is able to make use of latest feature of React.
## Requirements
Check the requirements [here](Requirements.md)
## Installation
It is a CLI tool and hence needs to be gloablly installed on your computer. To install, use the following commands -
```sh
npm install -g flash-generate
```or
```sh
yarn global add flash-generate
```## Usage
Here comes the most important part! Since this is the first version of Flash, the command to generate a basic React application is fairly simple -
```sh
flash-generate my-app --template=
````TEMPLATE_NAME` is used to specify which template you want to generate. Here is a list of all the valid template names-
1. **react-js**: Generates a JavaScript-based React template.
2. **react-router-js**: Generates a JavaScript-based React template with a pre-installed react-router.`The above command will create a directory called `my-app` inside the current folder with [this](DirectoryStructure.md) project directory structure
Inside that directory, it will generate the initial project structure and install the transitive dependencies.No configuration or complicated folder structures, only the files you need to build your app.
Once the installation is done, you can open your project folder:```sh
cd my-app
```Inside the newly created project, you can run some built-in commands:
### `yarn start`
Runs the app in development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.### `npm run build` or `yarn build`
Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.The build is minified and the filenames include the hashes.
Your app is ready to be deployed.
## License
Flash is open source software [licensed as MIT](https://github.com/ishubham21/flash-generate/blob/main/LICENSE).
## What's next?
I am caught with my end semester examinations, brb and will add more templates. I'll also bundle Typescript react applications with webpack. Alongside this, I also plan to add SCSS support.