Let's say I have something like:
{
"scripts": {
"clean": "some-clean-script",
"prebuild": "npm run clean",
"build": "some-build-script"
}
}
Inside my some-clean-script (which is written in NodeJS), I want to know if the script is running as part of the prebuild or was called directly.
How do I do that?