UNPKG

@viewdo/dxp-story-cli

Version:
21 lines (15 loc) 360 B
const File = require('./file') module.exports = class EnvConfig { constructor(file_service) { Object.assign(this, { file: new File(`./.env`, file_service) }) } save(config) { let contents = '' Object.keys(config).forEach(k => { contents += `${k.toUpperCase()}=${config[k]}\r\n` }) this.file.write(contents) } }