{"name":"cardinal","version":"2.0.0","description":"Syntax highlights JavaScript code with ANSI colors to be printed to the terminal.","main":"cardinal.js","scripts":{"test":"tap ./test/*.js","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.0.0"},"devDependencies":{"readdirp":"~2.1.0","tap":"~11.1.4"},"gitHead":"ec52f5c0eca736e64508d1a35cd783481d22234f","bugs":{"url":"https://github.com/thlorenz/cardinal/issues"},"homepage":"https://github.com/thlorenz/cardinal#readme","_id":"cardinal@2.0.0","_shasum":"00e4535d474fea0c35e15c0cfc1c7cfb5a7b87e5","_from":".","_npmVersion":"2.15.12","_nodeVersion":"8.9.1","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"dist":{"shasum":"00e4535d474fea0c35e15c0cfc1c7cfb5a7b87e5","tarball":"http://registry-npm.ywwl.com/cardinal/download/cardinal-2.0.0.tgz","fileCount":43,"unpackedSize":63764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3ikVCRA9TVsSAnZWagAAw5gP/3hV90iCILSSRjpoV1qd\nb/ixjaKdQSzJvGf6maP8YLAe9OkUeN9TYa36a0q5UzvZrq2z5jdhQg3xzH06\nimX0Lj4Ip5I8xJVnRQKkw0Bb+eu/ztKVZeB/OOyWSLKak+0AJRVXcIbHCGXo\n5BjZFyPOTepyG1mgZm9obPrSWP32sDJ1t/cEgEbMKrS2vMe0Ai1kjM70hvJN\nmIkEPcZ8jE7FKUxZjwOENiPgr4zYQ2SqrNxksPIgoxvOmwE845+cJDU+VTG7\nfDo0h1j4z0Uxm8mwpAnRSnT7RZnp6+/f7Ljvr843SAYXmNjSv/60tlckappa\nN8VAoKouuo0ZM+SF1dUUMoyEPerUi5DDvOG6f3aOuwpipjgnweEaTz88TWUj\nH+gLxq91kFxxnDiXJPlhBLlkPLqcOB+9NY7gEwm1QkKqqD4qVKdlVlFE4267\nwIUIHO3J+RgMWmnXexjeKkSMEawuQeFObMlwkTEBG/b8A7eKTkXUuBUHC/Ps\nxs+wrs7Sik+7sj0gWIEADBsWznNK1MDsgDHgCA3Zs3gosrvZn2teNhZ8jpFm\nSEQublF9awTBzRp0gwYatTSE0tGaQrJastBL7Raa9UJZOTUont69JIncafsX\nsrF9FZQMs8cOQ0tzbT0r2t+pa8cCiKAu0RAvrQJMpkPUFldG3+S2GsUbHXcb\n4YB9\r\n=8TG1\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-vd4yDShQZWJ2+QS8iNbwpziO+I8qXzzDwukojza+sL2s40ihWqWu7zucgGpygO4cS6WEPY9ayYJLiYxlITTiOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsq8eFUY9tmhQFh71ZLN2IeKAwDB72Mmv50NZmKbb0yAIgMhqIFphrNa2bU4uhpSbkMG2yT1eeQRK9b4nSQ96omb8="}],"size":13436,"noattachment":false,"key":"/cardinal/-/cardinal-2.0.0.tgz"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cardinal_2.0.0_1524508948623_0.5638687901968187"},"_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":1524508948716,"_cnpm_publish_time":1524508948716,"dist-tags":{"latest":"2.1.1"}}