1.0.1 • Published 8 years ago
codemo v1.0.1
codemo
Embeds console output to the code
Installation
npm i -S codemoUsage
const codemo = require('codemo')
codemo
.process("console.log('Hello world!')")
.then(result => consle.log(result))The result will be
console.log('Hello world!')
//> Hello world!API
codemo.process(code, [opts])
Return a promise with the resulting file combined with output.
opts.cwd- the directory in which the code should be executedopts.es6- whether the code is written using ES6
codemo.processFile(filePath, [opts])
Return a promise with the resulting file combined with output.
opts.es6- whether the code is written using ES6