{"name":"cardinal","version":"2.1.1","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":"c407ebe9c16122025488313fb1b020e62c0046ef","bugs":{"url":"https://github.com/thlorenz/cardinal/issues"},"homepage":"https://github.com/thlorenz/cardinal#readme","_id":"cardinal@2.1.1","_shasum":"7cc1055d822d212954d07b085dea251cc7bc5505","_from":".","_npmVersion":"2.15.12","_nodeVersion":"10.0.0","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"dist":{"shasum":"7cc1055d822d212954d07b085dea251cc7bc5505","tarball":"http://registry-npm.ywwl.com/cardinal/download/cardinal-2.1.1.tgz","fileCount":42,"unpackedSize":66043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBFcFCRA9TVsSAnZWagAAvYgP/3AwpMPqkUXebw0Yhorq\nBwtD3zhp+EstXpGoKAbp7LaFEKRqaSD2RKgRiaAaw6P7O/vO7U58Nz8lOaHJ\nMNHu4NwudAdTXnsPYighIwnJTp2Kc6U3mueCrwiUDqvV5w/CKpoYPstiFajS\nc+7B6nbLDUaT4EJuLwqrTRxC0hKMn+DN7DuQJKSOY2huK/++3c6t+WM1CbWO\ngIBPK5qcKNGBEaghid99fsTWneT7HTvHNJrddaNtJoEU2kmcMBFYjA/1yxwW\n4Sq/s1E0f2s9rvFxF56aRSpMI38XDVb8KiEMWCmjNTNsMaD2ON3LlvGQ32MG\ngpiq6Voqv3F3FTW5vInRYiYddjGTPiqbOflKXFEwOXG2VkS6kp2VnvM1Ixj1\nEXGDz9E+FoVq6vJ99HSsGxBpY5R+YvzjXMzORC2M/N1F5A9D6Izc+qP7zp5u\nCLDUPT9jLcXvkGeFdhJjdbDromSIj4S+2PfS0wMiaWESwve5YyL6DaXs6A3z\nwLQNhIaAC/jv0zG2PkAGZpnYkwKTeO0Xg1pVYY9YpnS6y/XmfrrsAjEclbjN\nJAROtsJ0v2qRbwuIY4fOlsioruHNhPmewp56TnNBJSWy+YZEBogbmPFbMg2e\n4Q/Bhrij4qOgqulNReIOx427ZxDeG3XAdjEm8TGdbtp2Ii+MjAcwVQRiszDQ\nyN9H\r\n=aX3i\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjTZpbAaTJW+O16EYLXK/DH2DPtNtMfBWT1ikpYHRhdwIgdBwhWBrnU12HVw8CHBeeYDBh7kVhesNE6ozNevTt05k="}],"size":14010,"noattachment":false,"key":"/cardinal/-/cardinal-2.1.1.tgz"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cardinal_2.1.1_1527011076961_0.7102539888151373"},"_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":1527011077164,"_cnpm_publish_time":1527011077164,"dist-tags":{"latest":"2.1.1"}}