Reputation: 367
I would like to create custom scripts for creating a new application just like npx create-react-app my-app
. However, I would like to customize libraries and folder structure etc. However, I am not quite sure how to approach this. I thought about two ways but I am unsure which one will best fit my needs.
fs
etc.I found that express has this feature but it would be nice to be able to customize these settings. Are there any alternative and possibly more efficient methods for doing this?
Also, if I were to do it via nmp packages. How can I run them from the cli?
Thanks in advance!
Upvotes: 2
Views: 433
Reputation: 38358
If customizations are not too advanced, you can start by creating a template repository and place a single setup
script in it, which can be implemented by using inquirer
npm module. Here is an example:
See https://github.com/kriasoft/nodejs-api-starter -> setup.js
Upvotes: 1