js-runner
v1.0.4
Published
run-js in
Downloads
3
Readme
jsRunner
a server to excute js code
install
// global
npm i js-runner -g
// local
npm i js-runner -g
feature
- use webpack@4 to bundle code
- read rules config and install dependencies automatically
- hot reload
option
export interface Option {
dir?: string
// webpack plugin
plugins?: any[],
// webpack module
rules?: any[],
// webpack resolve
resolve?: any,
port?: number,
// excutor function
excutor?: string
[propName: string]: any
}
example
code
import JsRunner from 'js-runner'
new JsRunner({
port: '6666'
}).start()
cli usage
$ js-runner -h
Usage: js-runner [options]
Options:
-V, --version output the version number
-r, --root <n> root directory, default: process.cwd()
-p, --port <n> listening port
-c, --config js.runner.config.js file
-h, --help output usage information
$ code ./folder
$ js-runner