RobotsAndPencils / react-gantry

R&P's React Starter Kit
4 stars 1 forks source link

Make installing react-gantry automated #9

Open akrigline opened 6 years ago

akrigline commented 6 years ago

The latest versions of create-react-app have a npx script that installs the blank react-app. I'm not certain how this works, but it would be excellent if we could replicate this with Gantry.

Requirements:

NPX Blog Post

akrigline commented 6 years ago

To be successful, a node script should do the following to get a new project up and running without the hassle of cloning the repo, changing the directory name, and resetting the git.

  1. Create a directory name as supplied by an argument.
  2. Create a copy of all of the files in the gantry itself in this new directory.
  3. npm install
  4. git init

What this would avoid:

I wonder if there's a simple way to just create a sharable node script that would do the clone / reset git automatically, and that's the solution to this problem.

akrigline commented 6 years ago

Cory House's react-slingshot has a setup script that automates the process that removes .git and changes the packagejson based on user prompts, then removes the startup script itself.

We could approach this from that angle: Create a gist that will let us use npx to:

  1. run git clone on this repo
  2. run npm run startup which will nuke the git and change the packagejson.