1.0.0 • Published 4 months ago
node-maya-postinstall v1.0.0
初始化
const { PostInstall } = require('node-maya-postinstall')
const postInstall = new PostInstall()
创建文件
postInstall.write(fileName, content)
更新 package.json 的 scripts
postInstall.updatePackageScripts(key, content)
更新 package.json 的依赖包
postInstall.updatePackageDependencies(type, key, content) // type: 1: dependencies 2: devDependencies
删除文件
postInstall.remove(fileName)
1.0.0
4 months ago