-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
32 lines (32 loc) · 1.95 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"name": "astral-angular-annotate",
"version": "0.0.2",
"description": "AngularJS DI annotation pass for astral",
"main": "annotate.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/btford/astral-angular-annotate.git"
},
"keywords": [
"astral",
"angular"
],
"author": {
"name": "Brian Ford"
},
"license": "MIT",
"readmeFilename": "README.md",
"dependencies": {
"astral-pass": "~0.1.0",
"clone": "~0.1.9"
},
"readme": "# Astral Angular Annotator\n\nA pass for [Astral](https://github.com/btford/astral) to generate [AngularJS](http://angularjs.org) [DI annotations](TODO: find docs) automatically.\n\nFor a tool CLI, see `[ngmin](TODO: link).\n\n## Usage\n\nBelow is an example parsing, annotating, and generating JavaScript code. Note that this requires the `esprima`, `escodegen`, `astral`, and `astral-angular-annotator` npm packages.\n\n```javascript\nvar esprima = require('esprima'),\n escodegen = require('escodegen'),\n astral = require('astral')();\n\n// register angular annotator pass\nrequire('astral-angular-annotator')(astral);\n\nvar inputCode = \"angular.module('myMod').controller('FooCtrl', function ($scope) {\" +\n\" // ...\" +\n\"});\";\n\nvar ast = esprima.parse(inputCode, {\n tolerant: true\n});\n\nastral.run(ast);\n\nvar generatedCode = escodegen.generate(ast, {\n format: {\n indent: {\n style: ' '\n }\n }\n});\n\nconsole.log(generatedCode);\n\n// logs:\n//\n// angular.module('myMod').controller('FooCtrl', ['$scope', function ($scope) {\n// // ...\n// });\n\n```\n\n## API\n\nYou can also access each of the individual passes like this:\n\n```\n\n```\n\nThis might be handy for more fine-tuned control.\n\n## License\nMIT\n",
"bugs": {
"url": "https://github.com/btford/astral-angular-annotate/issues"
},
"_id": "astral-angular-annotate@0.0.2",
"_from": "astral-angular-annotate@~0.0.1"
}