About script option in config.ts
Closed this issue · 3 comments
- Are the setup and run scripts (https://github.com/supertokens/create-supertokens-app/blob/master/lib/ts/config.ts#L31) going to be run in boilerplate/frontend/supertokens-react folder?
- Why do we need these here? I thought the project's root level package.json already has an init and a start script which calls the frontend / backend setup and run scripts right?
The setup
scripts are used to install dependencies.
The run
scripts are used to create the projects root level package.json
The setup scripts will not be part of the final package.json. The run scripts will be part of the final project root level package.json
But then why is the run thing as part of the frontend choices if it would apply to both frontend and backend?
To clarify, the setup
scripts for frontend and backend are used when setting up the folders for the user. After downloading them we run the setup scripts. So steps such as installing dependencies that we want the users to be able to skip should be included in the setup scripts.
The run scripts are used to add entries to the scripts
part of the final root level package json. So the run script for the frontend would be used to add a start:frontend
script and the backend would be used to add a start:backend
script. The user is instructed to run npm run start
which would then run both the frontend and backend scripts