I have a very hack-ish script to deal with a problem present only in node v6.
I have the following in my package.json:
"scripts": {
"pretest": "npm run target-2016 && tsc",
I want to run target-2016
only on node v6 (boron), is it possible?
答案 0 :(得分:1)
You could do something with the output of npm -v
. I'm not sure if I would try and put it all in package.json
, so maybe an external script for something like this would be good.