Hi! I've forked create-react-app to customise the template, due to having to start a lot of different small apps that share some dependencies (redux, etc.) and they work in very similar ways... is there any way of including template dependencies to be added to the generated package.json? That is not replacing this line (263) in createReactApp.js: const allDependencies = ['react', 'react-dom', packageToInstall];? What it the templateDependenciesPath constant in the init.js (line 107) being used for? Thanks!!!
@xavifuefer, Have you figured that out? I'm having the same questions.
@yakhinvadim check my fork here. Basically I created the file .template.dependencies.json, and as you can see in the line 130 of the init.js script I'm spawning the yarn/npm install command to install all of the dependencies specified in that file.
Next step is to add a new script that takes care of the precommit stuff so I can remove lint-staged, husky and prettier from the generated package.json and handle it from a react-scripts precommit script.
Most helpful comment
@yakhinvadim check my fork here. Basically I created the file
.template.dependencies.json, and as you can see in the line 130 of theinit.jsscript I'm spawning theyarn/npm installcommand to install all of the dependencies specified in that file.Next step is to add a new script that takes care of the
precommitstuff so I can remove lint-staged, husky and prettier from the generatedpackage.jsonand handle it from areact-scripts precommitscript.