# Code coverage report for lib/help.js

## Statements: 100% (5 / 5) Branches: 100% (0 / 0) Functions: 100% (1 / 1) Lines: 100% (5 / 5) Ignored: none

All files » lib/ » help.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    471

    1

    5

    5
    5

     module.exports = help

    function help(out, exit) {
    /*
    beefy path/to/entry.js[:as.js] [PORT] -- [forward arguments]

      Spins up a development server on ``http://localhost:PORT`` for
      working with static files and browserifiable JavaScript modules.

      If there's a path it doesn't recognize, it will serve up an
      empty HTML file with your javascript entry point included
      as a script tag. Otherwise you can provide your own ``index.html``.

      All arguments after ``--`` are forwarded to the ``browserify-command``.

      When the browser requests your entry point, it will run
      ``browserify-command`` with the forwarded arguments on the file
      and pipe the results into the response.

      If no PORT is defined, it defaults to 9966.

      If you specify your file in the form ``realfile.js:as-file.js``, any
      request to ``as-file.js`` will browserify ``realfile.js`` and return
      it as the output.

      arguments:

        --browserify command The command to run to compile your entry point.
                             If not provided, defaults to
                             ``./node_modules/.bin/browserify``, and falls
                             back to ``which browserify`` if that's not
                             available.

        --live               Enable live reloading. Reloads the page every time
                             your JavaScript changes.

        --cwd dir            Serve files as if run from ``dir``.

        --open               Automatically discover an open port, and open the
                             resulting URL in your default browser.
    */
      var str = help + ''

      out.write(str.slice(str.indexOf('/*') + 3, str.indexOf('*/')))
      exit(1)
    }