JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 502
  • Score
    100M100P100Q93942F
  • License MIT

Pipe your JavaScript into a browser, logging console output in Node

Package Exports

  • smokestack

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (smokestack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

smokestack experimental

Pipe your JavaScript into a browser, logging console output in Node.

Designed for running UI tests on your desktop machine. You can use this, for example, to run tape in the browser and get TAP output in your terminal.

Specifically, it does it like so:

  • Get the JavaScript input through a stream.
  • Instrument the script to pass console calls back home.
  • Host a temporary server with that script.
  • Run a standalone/untainted instance of Chrome and point it to the server.
  • When window.close is called, exit the Chrome process and end the stream.

WORK IN PROGRESS. TODO:

  • CLI interface
  • Support:
    • Firefox
    • Phantom
  • Instead of calling console commands directly, spit it out on the other side of the stream so it can be piped elsewhere. Will require emulation for time, timeEnd, etc.
  • Separate stdout and stderr streams?
  • Support for console methods not available in node.

Module Usage

NPM

stream = smokestack(opts)

Current options:

  • port: the port to run your temporary server on.

License

MIT. See LICENSE.md for details.