Y
Y
yuki2021-08-05 07:58:02
npm
yuki, 2021-08-05 07:58:02

Dynamic value substitution in npm scripts?

There is a conditional script

scripts: {
"test": "generate module тут_должно_быть_название && generate migration-dir тут_должно_быть_название"
}

When running through,
npm run test
how can I substitute a value with a name? And is it even possible?

PS: who uses nest (I gave the answer below), there is such a command in cli "nest gr res name". Then choose rest api/graphql/... and all the necessary files will be generated for you

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question