{"name":"cardinal","version":"2.0.1","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":"55c61cf2f86036f7612446d0a4dc8d69ddf4d83a","bugs":{"url":"https://github.com/thlorenz/cardinal/issues"},"homepage":"https://github.com/thlorenz/cardinal#readme","_id":"cardinal@2.0.1","_shasum":"2431630e6c006253b803967249b2d72e50d1985d","_from":".","_npmVersion":"2.15.12","_nodeVersion":"8.9.1","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"dist":{"shasum":"2431630e6c006253b803967249b2d72e50d1985d","tarball":"http://registry-npm.ywwl.com/cardinal/download/cardinal-2.0.1.tgz","fileCount":43,"unpackedSize":63934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3jGPCRA9TVsSAnZWagAAm6UP/Rpa+zfNDN9i1oT3szxL\n0c+7ddDoF56exCDwr/EX32wqGreJB55xuseru/S34Q9WgCfnvgNJi8S5j2qa\nKsPJRMLudHc6UIa8lrJn7Cq8HKy/9LRIujpi28XiInxDdY2PLZN+jRCGbvEJ\nduh9w2UnZxfDxZqoH2pPvYY6738mESsslUF3Ge1Lu3rKCKUH8Wg8aUfByUhC\nUsWy89rNyX7pPJk413IpCbE0IXiPDmUhg+IhyeGgulO/9oqeWvbXaba8wusn\nIZ6xJ2/glsEzP05VChriXhMXwHUfjRzDkIZlDE/iWrCIRwnVgxK/BJfUFpCy\nkhdA9+4c9Fs1LuGkkrGbfYZISxzlkU3HilYWkZZqNxt+zFW6C/LfskAy7ZLr\nPMdOQkzcpcnClVPBSTiOHkbEwf/ukHWls456bXucDq9peQlWXuD9mUz05q8f\nirKh/ymS2Ea/hoMvWzhNuLvt94NxBngPvH9jC1Q/GoOC7YmOCcOSLEyPYVe/\npLETrm5iDNPYAPwSVH4aEKnxc1CdoRQlQnkMRAyL6klt64cABUJM9NZEQVCs\nbz2u/LhPlM9XdrmUj9f9FJD4ASX8GCMkDgoWZeyWNsA1fupnuZ6Qx/OA0hBI\n0q1kmv0Tp5ThWeenNK8drqPwt+Eog1dm8m5xMZXY6ofEfYjCBMQ4RVeeg/sD\n4lWO\r\n=b0MC\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-fg/y661ctUIP6aQERDJrhVlAci5J7cHfbCs1DSFUI4q8FY7kJ6tOb+vfc0wN6SVog9hDEP3OwxptiHzrHawNHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDq5t2f9IE0mQKdZOFn7ZmbTQBoTNVSHcDdnQEStG/xDAiEAomzxBHCBvO9p1FPeIR3KjeVoClIuDeLQ/+d3Zm1XynE="}],"size":13555,"noattachment":false,"key":"/cardinal/-/cardinal-2.0.1.tgz"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cardinal_2.0.1_1524511118296_0.6897278947164838"},"_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":1524511118415,"_cnpm_publish_time":1524511118415,"dist-tags":{"latest":"2.1.1"}}