106 lines
5.8 KiB
JSON
106 lines
5.8 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "@babel/code-frame@^7.0.0-beta.35",
|
|
"scope": "@babel",
|
|
"escapedName": "@babel%2fcode-frame",
|
|
"name": "@babel/code-frame",
|
|
"rawSpec": "^7.0.0-beta.35",
|
|
"spec": ">=7.0.0-beta.35 <8.0.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/jest-message-util"
|
|
]
|
|
],
|
|
"_from": "@babel/code-frame@>=7.0.0-beta.35 <8.0.0",
|
|
"_id": "@babel/code-frame@7.0.0-beta.39",
|
|
"_inCache": true,
|
|
"_location": "/@babel/code-frame",
|
|
"_nodeVersion": "8.9.1",
|
|
"_npmOperationalInternal": {
|
|
"host": "s3://npm-registry-packages",
|
|
"tmp": "tmp/code-frame-7.0.0-beta.39.tgz_1517344042108_0.45995172555558383"
|
|
},
|
|
"_npmUser": {
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
},
|
|
"_npmVersion": "5.6.0",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "@babel/code-frame@^7.0.0-beta.35",
|
|
"scope": "@babel",
|
|
"escapedName": "@babel%2fcode-frame",
|
|
"name": "@babel/code-frame",
|
|
"rawSpec": "^7.0.0-beta.35",
|
|
"spec": ">=7.0.0-beta.35 <8.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/jest-message-util"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.39.tgz",
|
|
"_shasum": "91c90bb65207fc5a55128cb54956ded39e850457",
|
|
"_shrinkwrap": null,
|
|
"_spec": "@babel/code-frame@^7.0.0-beta.35",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/jest-message-util",
|
|
"author": {
|
|
"name": "Sebastian McKenzie",
|
|
"email": "sebmck@gmail.com"
|
|
},
|
|
"dependencies": {
|
|
"chalk": "^2.0.0",
|
|
"esutils": "^2.0.2",
|
|
"js-tokens": "^3.0.0"
|
|
},
|
|
"description": "Generate errors that contain a code frame that point to source locations.",
|
|
"devDependencies": {
|
|
"strip-ansi": "^4.0.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"integrity": "sha512-PConL+YIK9BgNUWWC2q4fbltj1g475TofpNVNivSypcAAKElfpSS1cv7MrpLYRG8TzZvwcVu9M30hLA/WAp1HQ==",
|
|
"shasum": "91c90bb65207fc5a55128cb54956ded39e850457",
|
|
"tarball": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.39.tgz"
|
|
},
|
|
"homepage": "https://babeljs.io/",
|
|
"license": "MIT",
|
|
"main": "lib/index.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "andarist",
|
|
"email": "mateuszburzynski@gmail.com"
|
|
},
|
|
{
|
|
"name": "xtuc",
|
|
"email": "contact@xtuc.fr"
|
|
},
|
|
{
|
|
"name": "existentialism",
|
|
"email": "bng412@gmail.com"
|
|
},
|
|
{
|
|
"name": "danez",
|
|
"email": "daniel@tschinder.de"
|
|
},
|
|
{
|
|
"name": "loganfsmyth",
|
|
"email": "loganfsmyth@gmail.com"
|
|
},
|
|
{
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
}
|
|
],
|
|
"name": "@babel/code-frame",
|
|
"optionalDependencies": {},
|
|
"readme": "# @babel/code-frame\n\n> Generate errors that contain a code frame that point to source locations.\n\n## Install\n\n```sh\nnpm install --save-dev @babel/code-frame\n```\n\n## Usage\n\n```js\nimport { codeFrameColumns } from '@babel/code-frame';\n\nconst rawLines = `class Foo {\n constructor()\n}`;\nconst location = { start: { line: 2, column: 16 } };\n\nconst result = codeFrameColumns(rawLines, location, { /* options */ });\n\nconsole.log(result);\n```\n\n```\n 1 | class Foo {\n> 2 | constructor()\n | ^\n 3 | }\n```\n\nIf the column number is not known, you may omit it.\n\nYou can also pass an `end` hash in `location`.\n\n```js\nimport { codeFrameColumns } from '@babel/code-frame';\n\nconst rawLines = `class Foo {\n constructor() {\n console.log(\"hello\");\n }\n}`;\nconst location = { start: { line: 2, column: 17 }, end: { line: 4, column: 3 } };\n\nconst result = codeFrameColumns(rawLines, location, { /* options */ });\n\nconsole.log(result);\n```\n\n```\n 1 | class Foo {\n> 2 | constructor() {\n | ^\n> 3 | console.log(\"hello\");\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\n> 4 | }\n | ^^^\n 5 | };\n```\n\n## Options\n\n### `highlightCode`\n\n`boolean`, defaults to `false`.\n\nToggles syntax highlighting the code as JavaScript for terminals.\n\n\n### `linesAbove`\n\n`number`, defaults to `2`.\n\nAdjust the number of lines to show above the error.\n\n### `linesBelow`\n\n`number`, defaults to `3`.\n\nAdjust the number of lines to show below the error.\n\n### `forceColor`\n\n`boolean`, defaults to `false`.\n\nEnable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`.\n\n### `message`\n\n`string`, otherwise nothing\n\nPass in a string to be displayed inline (if possible) next to the highlighted\nlocation in the code. If it can't be positioned inline, it will be placed above\nthe code frame.\n\n```\n1 | class Foo {\n> 2 | constructor()\n | ^ Missing {\n3 | };\n```\n\n## Upgrading from prior versions\n\nPrior to version 7, the only API exposed by this module was for a single line and optional column pointer. The old API will now log a deprecation warning.\n\nThe new API takes a `location` object, similar to what is available in an AST.\n\nThis is an example of the deprecated (but still available) API:\n\n```js\nimport codeFrame from '@babel/code-frame';\n\nconst rawLines = `class Foo {\n constructor()\n}`;\nconst lineNumber = 2;\nconst colNumber = 16;\n\nconst result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ });\n\nconsole.log(result);\n```\n\nTo get the same highlighting using the new API:\n\n```js\nimport { codeFrameColumns } from '@babel/code-frame';\n\nconst rawLines = `class Foo {\n constructor() {\n console.log(\"hello\");\n }\n}`;\nconst location = { start: { line: 2, column: 16 } };\n\nconst result = codeFrameColumns(rawLines, location, { /* options */ });\n\nconsole.log(result);\n```\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
|
|
},
|
|
"version": "7.0.0-beta.39"
|
|
}
|