{"name":"cardinal","version":"2.1.0","description":"Syntax highlights JavaScript code with ANSI colors to be printed to the terminal.","main":"cardinal.js","scripts":{"test":"npm run run-test && npm run lint","run-test":"tape test/*.js","lint":"standart","lint-fix":"standart --fix","demo":"node examples/highlight-string.js; node examples/highlight-self; node examples/highlight-self-hide-semicolons;"},"bin":{"cdl":"./bin/cdl.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/cardinal.git"},"keywords":["syntax","highlight","theme","javascript","json","terminal","console","print","output"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"thlorenz.com"},"license":"MIT","dependencies":{"ansicolors":"~0.3.2","redeyed":"~2.1.0"},"devDependencies":{"readdirp":"~2.1.0","standart":"~6.1.0","tape":"~4.9.0"},"standart":{"ignore":["test/fixtures"]},"gitHead":"7f97067a4da3219ee0ac3eed0e2518e2e923992c","bugs":{"url":"https://github.com/thlorenz/cardinal/issues"},"homepage":"https://github.com/thlorenz/cardinal#readme","_id":"cardinal@2.1.0","_shasum":"f601ebe3979005674a1eaec076237a8f3c3e61c4","_from":".","_npmVersion":"2.15.12","_nodeVersion":"10.0.0","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"dist":{"shasum":"f601ebe3979005674a1eaec076237a8f3c3e61c4","tarball":"http://registry-npm.ywwl.com/cardinal/download/cardinal-2.1.0.tgz","fileCount":42,"unpackedSize":65800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbA1X5CRA9TVsSAnZWagAA1mMP/2nNI0Kt2gzKeiy2Mna5\nqzmYe5Z99P8SH2XWKW0eau3174zWU1QD3b5deXJci+mQhTjzof4qmHHxQGmG\nHiyE94fmli3aL5vf0h4MtWs4Vy71p1BzaGU1FLfkv8Mw+BEn+fp6hYNsC4KH\ni9FNk8tP6HHRZDWa4oz2f9kwH+pJ9/EDsxv56ieO4fBRXLyV1MYOTGcu22jU\nLn3+iDFl3gDdDceHlPwriKIF+t+ROsHaCUL2mWZu+5zu5AaXEu0e2sapOotD\nR1nyEhTKoPlaqQ7BlKjOlP596vmQMIH5Le8/U2tb9OWDlec1GNW7QH4YVzVN\nblSr7YBwihDPMHoILhHZLjFrMsl1U0aFCzm2g1DUeB9bfyVeeu0zUeOWzyA+\nmZ0hToNxRiGPNrdvimbo34O/FMeEt3gitjVaGwNlshQORgL0NOn07MWWDMYe\nJTQh2wTN5dZNnfWsYte7/EKuYhL3r5w901p7Ra3BkIwVmjCSGcDXAAeb1tZX\nzKUIMFigQ4zeDQ3vOLYQRnD4SgOdrwVNCFgpjk4MNblE4XUwP0WAQKkPWLjx\nsTe1JO9triRvH6K14/Jo1yRmcL+MEdqNFwadDrjKKEf86KR5Bz/WkJ91SLYZ\nQjhR13o3JC2SS8v0aOQkEzuJIth7Iu+qR4KsJE/jA9M+wCuPZ6RqenLqTkES\n1F1q\r\n=bmIW\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-JVGMWR8z+9IQNPXnqZ769zvc6H0HYqcE1dhvetOrcs+cf6HniPCqDDpyTsYp/DcrBXzgDTFMEjZW8mvDZN4c+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyhI9O9RPfbeJK0tGAbXXP3sd+TbcQDuBNDUrb16y9/QIhAM1PgRKRYTBOOhsPIZpuq5bYGaWVu8CEWpwCVqt2zA2i"}],"size":13894,"noattachment":false,"key":"/cardinal/-/cardinal-2.1.0.tgz"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cardinal_2.1.0_1526945271904_0.35063396844748285"},"_hasShrinkwrap":false,"readme":"# cardinal [![Build Status](https://secure.travis-ci.org/thlorenz/cardinal.svg)](http://travis-ci.org/thlorenz/cardinal)\n\n<a href=\"https://www.patreon.com/bePatron?u=8663953\"><img alt=\"become a patron\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" height=\"35px\"></a>\n\n[![NPM](https://nodei.co/npm/cardinal.png?downloads=true&stars=true)](https://nodei.co/npm/cardinal/)\n\n**car·di·nal** *(kärdn-l, kärdnl)* - crested thick-billed North American finch having bright red plumage in the male.\n\n![screenshot](https://github.com/thlorenz/cardinal/raw/master/assets/screen-shot.png)\n\n## Features\n\n- highlights JavaScript code with ANSI colors to improve terminal output\n- theming support, see [custom color themes](https://github.com/thlorenz/cardinal/tree/master/themes)\n- optionally print line numbers\n- API and command line interface (`cdl`)\n- `.cardinalrc` config to customize settings\n- supports UNIX pipes\n\n***\n\n**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n- [Installation](#installation)\n  - [As library](#as-library)\n  - [As Commandline Tool](#as-commandline-tool)\n- [Commandline](#commandline)\n  - [Highlight a file](#highlight-a-file)\n  - [As part of a UNIX pipe](#as-part-of-a-unix-pipe)\n  - [Theme](#theme)\n- [API](#api)\n  - [*highlight(code[, opts])*](#highlightcode-opts)\n  - [*highlightFileSync(fullPath[, opts])*](#highlightfilesyncfullpath-opts)\n  - [*highlightFile(fullPath[, opts], callback)*](#highlightfilefullpath-opts-callback)\n  - [opts](#opts)\n- [Examples ([*browse*](https://github.com/thlorenz/cardinal/tree/master/examples))](#examples-[browse]https://githubcom/thlorenz/cardinal/tree/master/examples)\n\n\n## Installation\n\n### As library\n\n    npm install cardinal\n\n### As Commandline Tool\n\n    [sudo] npm install -g cardinal\n\n**Note:**\n\nWhen installed globally, cardinal exposes itself as the `cdl` command.\n\n## Commandline\n\n### Highlight a file\n\n    cdl <file.js> [options]\n\n**options**:\n  - `--nonum`: turns off line number printing (relevant if it is turned on inside `~/.cardinalrc`\n\n### As part of a UNIX pipe\n\n    cat file.js | grep console | cdl\n\n**Note:**\n\nNot all code lines may be parsable JavaScript. In these cases the line is printed to the terminal without\nhighlighting it.\n\n### Theme\n\nThe default theme will be used for highlighting.\n\nTo use a different theme, include a `.cardinalrc` file in your `HOME` directory.\n\nThis is a JSON file of the following form:\n\n```json\n{\n  \"theme\": \"hide-semicolons\",\n  \"linenos\": true|false\n}\n```\n\n- `theme` can be the name of any of the [built-in themes](https://github.com/thlorenz/cardinal/tree/master/themes) or the\nfull path to a custom theme anywhere on your computer.\n- linenos toggles line number printing\n\n## API\n\n### *highlight(code[, opts])*\n\n- returns the highlighted version of the passed code ({String}) or throws an error if it was not able to parse it\n- opts (see below)\n\n### *highlightFileSync(fullPath[, opts])*\n\n- returns the highlighted version of the file whose fullPath ({String}) was passed or throws an error if it was not able\n  to parse it\n- opts (see below)\n\n### *highlightFile(fullPath[, opts], callback)*\n\n- calls back with the highlighted version of the file whose fullPath ({String}) was passed or with an error if it was not able\n  to parse it\n- opts (see below)\n- `callback` ({Function}) has the following signature: `function (err, highlighted) { .. }`\n\n### opts\n\nopts is an {Object} with the following properties:\n\n- `theme` {Object} is used to optionally override the theme used to highlight\n- `linenos` {Boolean} if `true` line numbers are included in the highlighted code\n- `firstline` {Integer} sets line number of the first line when line numbers are printed\n- `jsx` {Boolean} if `true` _JSX_ syntax is supported, otherwise cardinal will raise an error\n    when encountering _JSX_ (default: `false`)\n\n**Note** The `json` option is obsoleted and not necessary anymore as cardinal properly understands both JSON and JavaScript.\n\n## Examples ([*browse*](https://github.com/thlorenz/cardinal/tree/master/examples))\n\n- [sample .cardinalrc](https://github.com/thlorenz/cardinal/blob/master/examples/.cardinalrc)\n- [highlighting a code snippet](https://github.com/thlorenz/cardinal/blob/master/examples/highlight-string.js) via\n  ***highlight()***\n- [file that highlights itself](https://github.com/thlorenz/cardinal/blob/master/examples/highlight-self.js) via\n  ***highlightFile()*** including line numbers\n- [file that highlights itself hiding all\n  semicolons](https://github.com/thlorenz/cardinal/blob/master/examples/highlight-self-hide-semicolons.js) via\n  ***highlightFileSync()***\n","publish_time":1526945271972,"_cnpm_publish_time":1526945271972,"dist-tags":{"latest":"2.1.1"}}