Reputation: 381
I'm trying to create my first cra-template on NPM and for some weird reason when I try my template locally using the file:./cra-template-[mytemplate] everything copy overs without problem. When I publish it and try using the npx create-react-app my-project --template [mytemplate] all files are being installed but not folder structure. What am I doing wrong?
My Folder structure goes like that :
template | |--src | |--api |--components
ect..
Thank you for the help
Upvotes: 0
Views: 68
Reputation: 381
Ok so I figured it out. You need to actually put a file inside the folder, .gitkeep as an example. If you don’t github is not going to create an empty folder and so when you are going to pull your template all files are going to be there but no folder.
Upvotes: 0