Javascript print error stack trace (pretty, terminal, html, markdown, etc)
npm install print-errorpretty-print coloured terminal (demo)
npm install print-error --save
`
Usage
`js
import {
html,
htmlErrorStack,
HTML_STYLE,
markdown,
terminal
} from 'print-error'
// Outputs an HTML page.
html(new Error(), { fontSize: '16px' })
// Outputs just the contents of the of the HTML page.
htmlErrorStack(new Error())
// Outputs Markdown.
markdown(new Error())
// Outputs colored terminal output.
terminal(new Error())
`
Terminal
This library uses pretty-error for coloured terminal error stack trace printing.
Contributing
After cloning this repo, ensure dependencies are installed by running:
`sh
npm install
`
This module is written in ES6 and uses Babel for ES5
transpilation. Widely consumable JavaScript can be produced by running:
`sh
npm run build
`
Once npm run build has run, you may import or require() directly from
node.
After developing, the full test suite can be evaluated by running:
`sh
npm test
`
When you're ready to test your new functionality on a real project, you can run
`sh
npm pack
`
It will build, test and then create a .tgz archive which you can then install in your project folder
`sh
npm install [module name with version].tar.gz
``