arminbro / generate-react-cli

A simple React CLI to generate components instantly and more.

Home Page:https://www.npmjs.com/package/generate-react-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dealing with branches

boostup opened this issue · comments

Is your feature request related to a problem? Please describe.

Concise description
How to keep directory generate-react-cli/templates/components + conf file generate-react-cli.json on any new branch, given that I require to have these included in the .gitignore file ?

Full description
For instance, I am ready to develop a new feature on my project, so I create a new branch from my staging branch.
Say I just found out about the package generate-react-cli, and by reading the docs I realise that I have to include the above mentioned directory and conf file. Since these cannot end up in my staging branch when the Pull Request merges my new feature, next time a develop on a new branch, for a new feature, I have to create the files again, before I can issue the command npx generate-react-cli component [MyComponentName].

Describe the solution you'd like
An idea that pops into my mind is :
Could I place the above mentioned directory and conf file into my home/user directory, and from the root directory of my local git project, issue the command npx generate-react-cli component [MyComponentName] ?

This way, I wouldn't have to :

  1. add the above mentioned files into my .gitignore,
  2. create those files again everytime I create a new git branch in the project I want to use generate-react-cli in.

Thanks and great work !

It looks like by adding the above mentioned files into my .gitignore only after having commited them (by mistake) to my repo was a problem. Now that I've clean my local branch and then commited, I can just keep the above mentioned files as untracked and gitignored ones, from branch to branch.
So, to be clear : i got a solution to this without having to modify this package.
Therefore, I'm closing this issue.