"index.ts" did not exist on "72b19e5cc236c83473c93cf6a96603a3f1b5f679"
Add a "quickRun" method in duniter API
When making a Duniter module, for testing it, we always have to create a run.js
file with the same boring code:
"use strict"
const co = require('co')
const stack = require('duniter').statics.autoStack([{
name: 'duniter-prover',
required: require('./index')
}])
co(function*() {
try {
yield stack.executeStack(process.argv)
} catch(e) {
console.error(e)
}
process.exit()
})
We could have some shortcut of it, wrapping above code:
require('duniter').statics.quickRun('./index.js')