basher
0.2.0 • Public • Published Basher.js 
Run any command or shell script anywhere, in any order.
Basic "hello" task
bin/run
:
require("../lib/runner")().run()
lib/runner.js
:
import { command } from "basher"
class Runner {
constructor(state) {
this.state({
task: state.options._[0],
tasks: this.commands
})
}
help(state) {
console.log(`Usage: ./bin/run [task]`)
}
run(state) {
return this.tasks(state)
}
}
export default command(Runner).include(__dirname)
lib/commands/hello.js
:
import { command } from "basher"
export default command(class {
description() {
return "hello description"
}
help(state) {
console.log(`Usage: ./bin/run hello`)
}
run() {
console.log("hello!")
}
})
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads