UNPKG

struk

Version:

📦 基于rollup的JS、TS、Vue2、React包构建工具 | One common construction and package tool for JS/TS/Vue2/React components based on Rollup 📦

16 lines (13 loc) 289 B
/** * package.json 加载器 */ const fs = require('fs') module.exports = (cwd = process.cwd()) => { const pkgPath = `${cwd}/package.json` if (fs.existsSync(pkgPath)) { return require(pkgPath) } else { console.warn('未找到 package.json 文件...') return {} } }