struct-builder
v0.1.3
Published
speed build directory struct
Downloads
2
Readme
STRUCT-BUILDER
Create some empty directory or file.
仅仅用来创建空目录和文件。
USAGE
实例化
const Struct = require('struct-builder'); const app = new Struct();
.diretory(obj)
app.directory({ config: [], });
.file(callback)
app.file((f, map) => { const rootFiles = [ 'package.json', ]; f.build(`${map.config.src}/webpack.js`); rootFiles.map(filename=>{ f.build(filename); }); f.injectOrigin(`${process.cwd()}/lib/app`); });
.alias([path])
app.alias('');
.output(option[,constants])
app.output({ //build position origin: process.cwd(), //isn't fetch inner app code fetch: true, }, { ALIAS_PATHS: reflux.alias(''), PRO_NAME: 'react-reflux', PRO_OUT_PATH: '/bin', LISENCE: 'ISC', SYS_USR: process.env.USER, },cons);