/react-app-initialisation-script

Primary LanguageShellGNU General Public License v3.0GPL-3.0

react-app-initialisation

This react app intialisation bash shell script automates some of the repetitive tasks that usually follow using the npx-create-react-app command. It features:

  • npx-create-react-app with dynamic app name input - you will be prompted by the script to enter a name for your app

  • Removes App.test.js, logo.svg and serviceworker.js from the /src directory

  • Creates containers, components and redux directories in /src directory, and an App directory in /src/containers

  • Moves App.js and App.css to /src/containers/App

  • Runs the command code . to open the app root directory in VS Code.

Please note, for the script to open VS Code, you will need to install the code . command in PATH. To do this, please follow these instructions, Launching from the command line.

Installation

To use the script, copy the file ReactAppInitialisation.sh from this repo in to the directory where you would like to create the react app.

cd to that directory and run source ReactAppInitialisation.sh.