Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
code / usr / share / code / resources / app / node_modules / vscode-textmate / package.json
Size: Mime:
{
  "_args": [
    [
      "vscode-textmate@https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
      "/vso/work/2/s"
    ]
  ],
  "_from": "vscode-textmate@3.1.0",
  "_id": "vscode-textmate@3.1.0",
  "_inCache": true,
  "_location": "/vscode-textmate",
  "_phantomChildren": {},
  "_requested": {
    "name": "vscode-textmate",
    "raw": "vscode-textmate@https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
    "rawSpec": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
    "scope": null,
    "spec": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
  "_shasum": "341f247aa36f3a96304d42b09eed7c4026915384",
  "_shrinkwrap": null,
  "_spec": "vscode-textmate@https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.0.tgz",
  "_where": "/vso/work/2/s",
  "author": {
    "name": "Microsoft Corporation"
  },
  "bugs": {
    "url": "https://github.com/Microsoft/vscode-textmate/issues"
  },
  "dependencies": {
    "fast-plist": "^0.1.2",
    "oniguruma": "^6.0.1"
  },
  "description": "VSCode TextMate grammar helpers",
  "devDependencies": {
    "coveralls": "^2.11.12",
    "istanbul": "^0.4.4",
    "mocha": "^3.0.2",
    "remap-istanbul": "^0.6.4",
    "tslint": "^3.15.1",
    "typescript": "^2.0.8",
    "typings": "^1.3.2"
  },
  "homepage": "https://github.com/Microsoft/vscode-textmate#readme",
  "license": "MIT",
  "main": "./release/main.js",
  "name": "vscode-textmate",
  "optionalDependencies": {},
  "readme": "# VSCode TextMate [![Build Status](https://travis-ci.org/Microsoft/vscode-textmate.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-textmate) [![Coverage Status](https://coveralls.io/repos/github/Microsoft/vscode-textmate/badge.svg?branch=master)](https://coveralls.io/github/Microsoft/vscode-textmate?branch=master)\r\n\r\nAn interpreter for grammar files as defined by TextMate. Supports loading grammar files from JSON or PLIST format. Cross - grammar injections are currently not supported.\r\n\r\n## Installing\r\n\r\n```sh\r\nnpm install vscode-textmate\r\n```\r\n\r\n## Using\r\n\r\n```javascript\r\nvar Registry = require('vscode-textmate').Registry;\r\nvar registry = new Registry();\r\nvar grammar = registry.loadGrammarFromPathSync('./javascript.tmbundle/Syntaxes/JavaScript.plist');\r\n\r\nvar lineTokens = grammar.tokenizeLine('function add(a,b) { return a+b; }');\r\nfor (var i = 0; i < lineTokens.tokens.length; i++) {\r\n\tvar token = lineTokens.tokens[i];\r\n\tconsole.log('Token from ' + token.startIndex + ' to ' + token.endIndex + ' with scopes ' + token.scopes);\r\n}\r\n```\r\n\r\n## Using asynchronously\r\n\r\nSometimes, it is necessary to manage the list of known grammars outside of `vscode-textmate`. The sample below shows how this works:\r\n\r\n```javascript\r\nvar Registry = require('vscode-textmate').Registry;\r\n\r\nvar registry = new Registry({\r\n\tgetFilePath: function (scopeName) {\r\n\t\t// Return here the path to the grammar file for `scopeName`\r\n\t\tif (scopeName === 'source.js') {\r\n\t\t\treturn './javascript.tmbundle/Syntaxes/JavaScript.plist';\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n});\r\n\r\n// Load the JavaScript grammar and any other grammars included by it async.\r\nregistry.loadGrammar('source.js', function(err, grammar) {\r\n\tif (err) {\r\n\t\tconsole.error(err);\r\n\t\treturn;\r\n\t}\r\n\r\n\t// at this point `grammar` is available...\r\n});\r\n\r\n```\r\n\r\n## Tokenizing multiple lines\r\n\r\nTo tokenize multiple lines, you must pass in the previous returned `ruleStack`.\r\n\r\n```javascript\r\nvar ruleStack = null;\r\nfor (var i = 0; i < lines.length; i++) {\r\n\tvar r = grammar.tokenizeLine(lines[i], ruleStack);\r\n\tconsole.log('Line: #' + i + ', tokens: ' + r.tokens);\r\n\truleStack = r.ruleStack;\r\n}\r\n```\r\n\r\n## API doc\r\n\r\nSee [the main.ts file](./src/main.ts)\r\n\r\n## Developing\r\n\r\n* Clone the repository\r\n* Run `npm install`\r\n* Compile in the background with `npm run watch`\r\n* Run tests with `npm test`\r\n* Run benchmark with `npm run benchmark`\r\n* Troubleshoot a grammar with `npm run inspect -- PATH_TO_GRAMMAR PATH_TO_FILE`\r\n\r\n## Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n\r\n\r\n## License\r\n[MIT](https://github.com/Microsoft/vscode-textmate/blob/master/LICENSE.md)\r\n\r\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Microsoft/vscode-textmate.git"
  },
  "scripts": {
    "benchmark": "node benchmark/benchmark.js",
    "compile": "tsc",
    "inspect": "node scripts/inspect.js",
    "prepublish": "node scripts/release.js",
    "test": "mocha out/tests/tests",
    "test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec out/tests/tests",
    "watch": "tsc -watch"
  },
  "typings": "./release/main.d.ts",
  "version": "3.1.0"
}