Repository navigation
tern repository #424
Description
Activity
If you want to author such a file, and submit a pull request that includes it in the root of the repository, it'll automatically end up on ternjs.net. But for consistency, please use JSON instead of XML.
Many thank's @marijnh for your answer! I will do create a PR with this repository.json file.
please use JSON instead of XML.
Ok, I will do it.
A co-worker and I are also looking into this, w/ support for TS defs as well. We've both finally got some time and are going to be going over a game plan in the next couple of weeks.
@bfricka I had intention to create a PR with repository.json after exploring it inside Eclipse IDE, but if you need it, I can create it and do a PR. I will create a second PR to add some info if will need when I will explore it inside Eclispe IDE. Tell me if you need now this repository.json
Ok here a proposition about repository.json with closure and express tern plugin :
{ "tern-closure": { "label": "Closure", "homepage": "https://developers.google.com/closure/library/", "repository": { "type": "git", "url": "https://github.com/google/tern-closure" } }, "node-express": { "label": "Express", "homepage": "http://expressjs.com/", "description": "Add express web application framework for node support. Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.", "repository": { "type": "git", "url": "https://github.com/angelozerr/tern-node-express.git" }, "category": "node" } }JSOn keys are tern plugin name which have information about tern plugin (repository, homepage, description, label). category is used to display for instance express in a tree item after the node tree ietm.
Official list of plugins #431 seems to be user facing part of this issue "tern repository.json"
Official list of plugins #431 seems to be user facing part of this issue "tern repository.json"
Goal of ern repository.json is to list non official tern plugins. Official tern plugins are hosted inside tern https://github.com/marijnh/tern/tree/master/defs and https://github.com/marijnh/tern/tree/master/plugin
@angelozerr said in #431
List is computed on runtime. It loops for folder from a tern folder (defs, plugin + node_modules/tern-*) ro retrieve list of tern plugins + defs (I have called that tern modules inside tern.java).
It's the first step, after that, each module displays information, like url, options of the tern plugin, etc. It uses metadata file at https://github.com/angelozerr/tern.java/tree/master/core/tern.core/metadata (I think it should be cool if each tern plugin could host this metadata file, but it's another topic)
If those files (in
metadatafolder) are to be hosted inside this git repository, aren't they already tern repository ? And it is easier to see history when there are multiple files, compared to one big file(I think it should be cool if each tern plugin could host this metadata file, but it's another topic)
What if each tern plugin could can optionally hold such file to overwrite the one inside tern git repository ?
If those files (in metadata folder) are to be hosted inside this git repository
I mean that each tern plugin hosts their metadata JSON file, not inside this tern git repository.
We need a list of "unnoffical" tern plugin repository.json should exists for that.
(I think it should be cool if each tern plugin could host this metadata file, but it's another topic)
If those files (in metadata folder) are to be hosted inside this git repository, aren't they already tern repository ?
I mean that each tern plugin hosts their metadata JSON file, not inside this tern git repository.
OK. Then minimal tern
metadata/repository.jsonis to list URL to such.metadata.jsonfiles like{ "tern-closure": { "metadataurl": "https://raw.githubusercontent.com/google/tern-closure/master/tern-closure.metadata.json" }, "node-express": { "metadataurl": "https://raw.githubusercontent.com/angelozerr/tern-node-express/master/tern-node-express.metadata.json" }, }
otherwise
metadata/repository.jsonwould contain copy of data that may be out of date.Having filename as
tern-*.metadata.jsonor fixedwill make life easier.tern.metadata.jsonThen any software that will use such
metadata/repository.jsonshould check/get latest version oftern-*.metadata.jsonfiles. Or a)metadata/folder already has them and is like cache.Or b)
metadata/folder can have them to redefine, i.e. overwrite definition, e.g. for case when plugin is already included into software package together with tern.See angelozerr/tern.java#190 for creating tern repository from
*.metadata.jsonproposed format was changed to make it resemble
*.metadata.jsonfiles content.[ { "name": "angular", "metadataurl": "https://raw.githubusercontent.com/angelozerr/tern.java/master/core/tern.core/metadata/angular.metadata.json" }, { "name": "aui", "metadataurl": "https://raw.githubusercontent.com/angelozerr/tern.java/master/core/tern.core/metadata/aui.metadata.json" },
- added a commit that references this issue
on Dec 4, 2014 There are 3 ways:
-
- tern
metadata-repository.jsonis to be manually maintained
- tern
-
- tern
metadata-repository.jsonis generated from*.metadata.jsonfiles
- tern
-
- tern
metadata-repository.jsoncontaining"metadataurl"can be regenerated
- tern
Proposed story for Tern plugin author for way 3:
- create
name.metadata.jsonfile inside plugin repository - modify https://github.com/marijnh/tern/blob/master/metadata/repository.json to add an entry with at least
"name"and"metadataurl" - optionally copy
name.metadata.jsontometadatafolder inside https://github.com/marijnh/tern git repository (e.g. as Pull Request)
-
- added a commit that references this issue
on Dec 4, 2014 As suggested in angelozerr/tern.java#195
please rename this issue to
plugins.json- added a commit that references this issue
on Dec 9, 2014
Today it exists more and more "non official" tern plugin like Closure, Meteor, YUI, Express, etc
I try to integrate it inside tern.java. You can see list of tern plugins at https://github.com/angelozerr/tern.java/wiki/Getting-Started#tern-modules
But I think it should be very cool if tern could host a kind of site which enumerates list of tern plugin. An idea that I have is that ternjs provides this url http://ternjs.net/repository.xml and returns an XML stream like this :
This XML file repository could be used after by some IDE to install tern plugin (show list of existing tern plugin in an UI list).