node.js - 在节点脚本中按顺序运行一组纱线命令
问题描述
我想按顺序使用纱线命令并在节点脚本中运行它,在中间步骤中,并根据需要将其与 js 混合。例如
yarn audit > out.json
//some file reading, processing, and storage
for(i = 0; i < libs.length; i++) {
yarn add lib1@v1.1.1 //need to run this in a loop
//print the console output as this is being done
}
以上是否可以在节点 js 或任何其他可用于节点项目的脚本中实现?
解决方案
推荐阅读
- sql - AS400中的空字符串是否有类似于COALESCE的功能
- java - 在java中删除不必要的小数
- postgresql - 哪种方法更适合 PostgreSQL 中的 UPSERT?
- xml - XML 解析数字保留两位小数
- redirect - 除了 web.config 重定向规则,还有更多设置吗?
- android - Firebase 云消息传递捕获通知
- mobile - 如何在 Katalon Studio 的自动化测试中为检查点重用元素的值
- android - rhino 在安卓手机上运行 javascript 很慢
- django - 数据库中的django模型字段注释
- javascript - 如何将 x->n y->n 对象顺时针旋转 90°?