1234567891011121314151617181920212223242526272829 |
- /*
- * @Date: 2022-07-04 15:58:08
- * @LastEditors: 陈禹琨 cyk910622@163.com
- * @LastEditTime: 2022-08-24 17:24:45
- * @FilePath: \upcloud-wms-hnsy-web\updatePlglib.js
- * @Description: cyk
- */
- const path = require('path')
- const fs = require('fs/promises')
- const cp = require('child_process')
- let d1 = fs.rm(path.join(__dirname, 'node_modules', '_plglib@1.1.0@plglib'), {
- force: true,
- recursive: true,
- })
- let d2 = fs.rm(path.join(__dirname, 'node_modules', 'plglib'), {
- force: true,
- recursive: true,
- })
- Promise.all([d1, d2]).then(err => {
- if (err[0] || err[1]) {
- console.log('删除文件失败')
- return;
- }
- cp.exec('plgnpm i', err => {
- });
- });
|