UNPKG

taitan

Version:

小程序开发辅助工具

19 lines (16 loc) 481 B
const path = require('path') const fs = require('fs'); const { localData } = require('./utils'); let config = { "wxappCliPath":localData('wxappCliPath') } config.dir = config.rootPath ? `${process.cwd()}${config.rootPath}`:process.cwd(); const wxconfigPath = `${process.cwd()}/wxconfig.json` if(fs.existsSync(wxconfigPath)){ let wxconfig = fs.readFileSync(wxconfigPath,{encoding:'utf-8'}) config = { ...config, ...JSON.parse(wxconfig) } } module.exports = config