jsctags generator using tern
For access to the binary:
npm install -g git+https://github.com/ramitos/jsctags.git
Otherwise, add to your project's package.json under dependencies or dev-dependencies:
"jsctags": "git://github.com/ramitos/jsctags.git"
$ jsctags [--dir=/path/to] /path/to/file.js [-f]
$ cat /path/to/file.js | jsctags [--dir=/path/to] [--file=/path/to/file.js] [-f]
By default, jsctags
will output a JSON file. Use the -f
flag to output an exuberant ctags-compatible file.
var jsctags = require('jsctags'),
fs = require('fs')
var file = '/path/to/file.js'
var dir = '/path/to/'
var content = fs.readFileSync(file, 'utf8')
jsctags(file, dir, content, function (e, tags) {
console.log(tags)
})
- arguments
- autothis
- browser
- builtins
- cautiouspropagation
- copyprops
- ctorpattern
- docstrings
- effects
- extends
- finddef
- fn_arguments
- generic_each
- global_this
- infinite-expansion
- jsdoc
- merge
- new_array
- new_to_prototype
- object_create
- objnames
- plus
- proto
- protoname
- replace_bogus_prop
- simple_generic
- simple
MIT