rapid
Version:
A simple tool for rapidly creating components
13 lines (11 loc) • 325 B
JavaScript
// tooling
const fs = require('../fs');
module.exports = ({ from, to }, config = {}) => Promise.resolve([
fs.join(config.from, from),
fs.join(config.from, to)
]).then(
// promise source copied to destination
([ absoluteFrom, absoluteTo ]) => fs.mkdir(absoluteTo).then(
() => fs.copydir(absoluteFrom, absoluteTo)
)
);