You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
<repository>
<pluginname="tern-closure"url="https://github.com/google/tern-closure.git"description= "A Tern plugin adding support for Closure." />
<pluginname="tern-meteor"url="https://github.com/Slava/tern-meteor.git"description= "Autocompletion plugin for Meteor 1.0." />
</repository>
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).
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.
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.
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 metadata folder) 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 ?
otherwise metadata/repository.json would contain copy of data that may be out of date.
Having filename as tern-*.metadata.jsonor fixed tern.metadata.json will make life easier.
Then any software that will use such metadata/repository.json should check/get latest version of tern-*.metadata.json files. 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.
Activity
marijnh commentedon Nov 25, 2014
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.
angelozerr commentedon Nov 25, 2014
Many thank's @marijnh for your answer! I will do create a PR with this repository.json file.
Ok, I will do it.
bfricka commentedon Nov 25, 2014
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.
angelozerr commentedon Nov 25, 2014
@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
angelozerr commentedon Nov 25, 2014
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.
paulvi commentedon Dec 1, 2014
Official list of plugins #431 seems to be user facing part of this issue "tern repository.json"
paulvi commentedon Dec 1, 2014
@bfricka
Can you point to or create new issue for TS defs support
angelozerr commentedon Dec 1, 2014
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
paulvi commentedon Dec 1, 2014
@angelozerr said in #431
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 fileWhat if each tern plugin could can optionally hold such file to overwrite the one inside tern git repository ?
angelozerr commentedon Dec 2, 2014
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.
paulvi commentedon Dec 4, 2014
OK. Then minimal tern
metadata/repository.jsonis to list URL to such.metadata.jsonfiles likeotherwise
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.ref ternjs/tern#424 Creating tern metadata/repository.json from `*.me…
paulvi commentedon Dec 4, 2014
See angelozerr/tern.java#190 for creating tern repository from
*.metadata.jsonproposed format was changed to make it resemble
*.metadata.jsonfiles content.Idea: `*.metadata.json` file has "metadataurl" property
paulvi commentedon Dec 4, 2014
There are 3 ways:
metadata-repository.jsonis to be manually maintainedmetadata-repository.jsonis generated from*.metadata.jsonfilesmetadata-repository.jsoncontaining"metadataurl"can be regeneratedProposed story for Tern plugin author for way 3:
name.metadata.jsonfile inside plugin repository"name"and"metadataurl"name.metadata.jsontometadatafolder inside https://github.com/marijnh/tern git repository (e.g. as Pull Request)script for keeping tern repository updated by using metadataurl prope…
paulvi commentedon Dec 9, 2014
As suggested in angelozerr/tern.java#195
please rename this issue to
plugins.jsonternjs#424 plugins.json generated from metadata in tern.java