UNPKG

@bincode/jekpack

Version:

[![npm version](https://badge.fury.io/js/%40bincode%2Fjekpack.svg)](https://badge.fury.io/js/%40bincode%2Fjekpack) [![Build Status](https://travis-ci.org/yfxie/jekpack.svg?branch=master)](https://travis-ci.org/yfxie/jekpack) [![codecov](https://codecov.io

10 lines (9 loc) 288 B
const fs = require('fs-extra'); const path = require('path'); module.exports = (dir, files) => { Object.keys(files).forEach(rawPath => { const filePath = path.join(dir, rawPath); fs.ensureDirSync(path.dirname(filePath)); fs.writeFileSync(filePath, files[rawPath]); }); };