A
A
andrewayder2021-11-23 00:19:06
JavaScript
andrewayder, 2021-11-23 00:19:06

How to write script in package.json?

Hello, I need to implement something like

"serve": "(...args)=>{if(...args) console.log('serve does not take argument in this project'); return 'vue-sli-service serve'"},

so that the user cannot pass arguments along with npm run serve, how to do this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2021-11-23
@andrewayder

No need to be smart, just put ;at the end of the command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question