UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

21 lines (16 loc) 319 B
var tmp = require('../lib/tmp'), spawn = require('./spawn-sync'); var graceful = spawn.arg; if (graceful) { tmp.setGracefulCleanup(); } try { var result = spawn.tmpFunction(); spawn.out(result.name, function () { throw new Error('Thrown on purpose'); }); } catch (e) { spawn.err(e, spawn.exit); }