js-runner

1.0.4 • Public • Published

jsRunner

a server to excute js code

img codecov gif

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

/js-runner/

    Package Sidebar

    Install

    npm i js-runner

    Weekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    20.4 MB

    Total Files

    110

    Last publish

    Collaborators

    • anc95