【发布时间】:2018-12-19 23:27:44
【问题描述】:
我有一些如下所示的启动脚本:
"nodemonBabel": "nodemon src/index.js --exec babel-node",
"nodemonLint": "nodemon src/index.js --exec 'npm run lint && node'"
我在 cli 中使用 npm run nodemonBabel 来查看我的代码 nodemon 并触发 Babel 在代码更改时对其进行转译。我还使用npm run nodemonLint 与nodemon 一起观看,同时在代码更改时触发eslint。
如何将两个脚本合并为一行?即,使用 nodemon 监视我的代码,使用 Babel 从单个脚本中进行 lint 和 transpile,而我不必为每次更改都重新运行?
【问题讨论】:
标签: node.js npm babeljs eslint nodemon