supertokens/create-supertokens-app

About script option in config.ts

Closed this issue · 3 comments

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