-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating tern plugins.json was: Creating repository.json #190
base: master
Are you sure you want to change the base?
Conversation
…tadata.json` files Example of output file ```js [ { "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" }, ```
Today metada is just used by Tern IDE. I host it inside tern.java but my idea is that each tern plugin host their metadata. We don't need to know a list of metadata file. This metadata.json file could be hosted in the root of the tern project (like package.json). (see https://github.com/angelozerr/tern-node-express the metdata.json file could be hosted next to package.json) |
My initial idea is that We are still discussing how to make it better. |
There is no metadata.json file there |
At first you must know that list of tern modules is computed on runtime (there is no list for that) by using a folder tern root. By default it uses https://github.com/angelozerr/tern.java/tree/master/core/tern.core/node_modules/tern, but you can use your own tern repository if you wish. To retrieve tern modules :
At this step, we need not some repository.json or metadata.json After when you select a tern module, it displays informations about url, bugs, options, etc. Those informations comes from metadata.json. Today I search metadata.json inside tern.java, but for custom tern plugin, metadata json is not available. So it should be better that tern-* plugin host this metadata.json in their project. tern.java could load from the tern-* folder.
I said "could be hosted ". My goal is that tern provides those metadata.json, after that I will do the same thing than my other tern plugin projects. Goal of repository.json is to give the capability to install (download) "non official" tern project (like an update site), but NOT to create the list that you see in Tern -> Modules |
well, I would see it as one file defining what plugins to use. and the content of the file is what being discussed. let's put metadata aside for a while. @marijnh seems to accept any reasonable solution, That why it can be maid and used here first |
yes! metadata will come after. Here my proposition for repository.json : {
"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"
}
} Are you OK with that? My idea is to provide a wizard which loads ternjs.net/repository.json and display list of "non offical plugins". You can check tern plugin that you wish, and after we can execute npm install for each tern plugins to download it in a tern repository. |
That will make entries more similar to |
OK, |
Yes that's it. I think we could start to develop a simple wizard which displays content of this repository.json (we could host for the moment in tern.java for our test). We select a tern plugin (like closure) and download it with npm for instance. Do you think you could help me for that? |
No promises. And that is other issue #195. I thought this one was about making that My initial idea was just to collect all known plugins ternjs/tern#431 and as tern.java currently holds most part of plugins, we could use it to generate repository.json Once format is OKed by @marijnh , we could go further. |
@paulvi I think repository.json can be written at hand. |
Yes, definitely write it by hand. A solution that uses a list of links and has to fetch data from them seems like a huge overkill for the problem at hand. (For distribution of packages, maybe look into building on top of npm, to prevent reinventing the wheel as much as possible.) |
Thank's @marijnh for your comment. I have started to develop something to display list of tern modules inside Eclipse wizard. See #195 (comment) Any comments are welcome. Thank's!
The big problem is that most of tern plugisn are not published (like tern-meteor). I have tried to explain it Slava/tern-meteor#17 but no success -( So I think we should give 2 possibilities :
|
there is generated {
"angular": {
"label": "AngularJS",
"homepage": "https://angularjs.org/",
"description": "Adds AngularJS support.",
"repository": {
"type": "git",
"url": "https://github.com/angelozerr/tern.java.git"
}
},
"aui": {
"label": "AlloyUI",
"homepage": "http://alloyui.com/",
"description": "Adds AlloyUI support. AlloyUI is a framework built on top of YUI3 (JavaScript) that uses Bootstrap (HTML/CSS) to provide a simple API for building high scalable applications.",
"repository": {
"type": "git",
"url": "https://github.com/angelozerr/tern.yuidoc.git"
}
}, comparing to @angelozerr example above it lacks "category" field. It is generated via updated script
Well, it was too early. I proposed in #191 to have "metadataurl" property in every entry, |
tern metadata/repository.json from
*.metadata.json
filesExample of output file