Skip to content
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

#424 plugins.json generated from metadata in tern.java #438

Closed
wants to merge 1 commit into from

Conversation

paulvi
Copy link
Contributor

@paulvi paulvi commented Dec 9, 2014

plugins.json generated from metadata in tern.java

29 entries

tern-plugins

see discussion in angelozerr/tern.java#190

paulvi added a commit to paulvi/tern-plugins that referenced this pull request Dec 9, 2014
@angelozerr
Copy link
Contributor

Many thank's @paulvi!

I would like to just know if the format for each plugin is OK or not.

For instance I think we should have category field, perhaps support npm? Is homepage is OK, etc?

@marijnh
Copy link
Member

marijnh commented Dec 9, 2014

Why doesn't homepage refer to the actual project that creates the plugin, rather than to the project that the plugin targets? If someone wants to use a plugin for Closure, presumably they already know what Closure is.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 10, 2014

I guess because each entry is not about a plugin, but supported technology first.

Add "pluginhomepage" ? It can be taken from repository.url

@angelozerr For all currently absent fields like "category" I can add them as empty.

https://github.com/paulvi/tern-plugins/

@paulvi
Copy link
Contributor Author

paulvi commented Dec 10, 2014

Please also compare with the most full variant https://github.com/paulvi/tern-plugins/blob/master/plugins.json

It also has "dependencies"

"dependencies": [
    "ecma5",
    "browser"
],

https://github.com/paulvi/tern-plugins/blob/master/plugins.json#L187-196

@marijnh
Copy link
Member

marijnh commented Dec 10, 2014

Dependencies can be useful, I guess, when automating installation of a plugin. Is there a way for a tool to recognize which plugins are built into Tern itself, so that it won't try to install them? What is the process of installing these anyway? I still think we should standardize on npm and have the npm package name of the plugins in this file.

@angelozerr
Copy link
Contributor

Ok so many comments about this plugins.json descriptor and metadata. There are several problems with the generated plugins.json

  • goal of plugins.json is to list the tern plugins that you can download. So I think tern plugins hosted by tern like requirejs, jquery, underscore, etc should not appear in this list because when you have tern, you have those tern plugins.
  • plugins.json should not store the options (ex : for node https://github.com/paulvi/tern-plugins/blob/master/plugins.json#L553)
"options": [
      {
        "name": "dontLoad",
        "description": "Can be set to true to disable dynamic loading of required modules entirely,\nor to a regular expression to disable loading of files that match the expression.",
        "type": "boolean"
      },

options are used when tern plugin is configured (when it is download). In tern.java I use those information to provide an UI to customize the node plugin. So I think options should be removed from plugins.json

  • dependencies are used inside tern.java to check automaticly the dependencies plugins (ex : you check browser and ecma5 is checked too). dependencies can be found too in the package.sjon but if you don't want to have dependencies inside plugins.json, it means that you must download package.json to know dependencies.
  • dojotoolkit is not a tern plugin, tern plugin are dojotoolkit _1.6, dojotoolkit _1.8, dojotoolkit _1.9 (I must create a github project per version since teh answer of How to manage version of plugin? #441). So plugins.json must have 3 entries. In other words you cannot generate plugins.json just from metadata.
  • homepage should perhaps reference the github project. Which can field name could we use to add a link to the JS framework?
  • category is very usefull to categorize tern plugin inside a treeview (see Tern Modules & Categories angelozerr/tern.java#166). category could reference a tern plugin or not.
  • last question is about download : npm is a solution but today only tern-closure is available with npm (it was published). More if we decide to use npm to download tern plugins, it means that we cannot use the last version of the github. We need wait for that tern plugin is published. I'm afraid too that npm will download several version of tern (if creator of tern plugins doesn't update their package.json version of tern). So I tell me if we could give the capability to download tern plugin with npm and with git. @paulvi could you help me to implement download with npm for Download tern plugins from ternjs repository.json angelozerr/tern.java#195 Thank's!
  • icon : it should be cool if we can add an url to the icon for each plugin. In my case I use https://github.com/angelozerr/tern.java/tree/master/eclipse/tern.eclipse.ide.ui/icons/full/obj16 but i think it should be cool if each tern plugin host their icon (like metadata.json)

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

Please give json examples, or comment on paulvi/tern-plugins@ca6cdd4 or https://github.com/paulvi/tern-plugins/blob/ca6cdd499058ba50297f8f85c5fcf5d2f021f82b/plugins.json (as the most full option)

.1. goal of plugins.json is to list the tern plugins that you can download. So I think tern plugins hosted by tern like requirejs, jquery, underscore, etc should not appear in this list because when you have tern, you have those tern plugins.

I think built-in plugin should appear, with "bultin": true

.3. dependencies are used inside tern.java to check automaticly the dependencies plugins (ex : you check browser and ecma5 is checked too). dependencies can be found too in the package.sjon but if you don't want to have dependencies inside plugins.json, it means that you must download package.json to know dependencies.

yep, dependencies are sure to be

.4. dojotoolkit is not a tern plugin, tern plugin are dojotoolkit _1.6, dojotoolkit _1.8, dojotoolkit _1.9 (I must create a github project per version since teh answer of #441). So plugins.json must have 3 entries. In other words you cannot generate plugins.json just from metadata.

Can we name dojotoolkit _1.6 as "plugin version file" ?
Then insdide plugins.json add
{"version": ... , "file": ...}, {"version": ... , "file": ...},

.5. homepage should perhaps reference the github project. Which can field name could we use to add a link to the JS framework?

I suggested "pluginhomepage"

.6. category is very usefull to categorize tern plugin inside a treeview (see angelozerr/tern.java#166). category could reference a tern plugin or not.

OK, category currently is absent event the most full variant

.7. last question is about download : npm is a solution but today only tern-closure is available with npm (it was published). More if we decide to use npm to download tern plugins, it means that we cannot use the last version of the github. We need wait for that tern plugin is published. I'm afraid too that npm will download several version of tern (if creator of tern plugins doesn't update their package.json version of tern). So I tell me if we could give the capability to download tern plugin with npm and with git. @paulvi could you help me to implement download with npm for angelozerr/tern.java#195 Thank's!

npm can install from url like GitHub or local folder,
but let's do not explicitly rely on npm, it should be just implementation details.

.8. icon : it should be cool if we can add an url to the icon for each plugin. In my case I use https://github.com/angelozerr/tern.java/tree/master/eclipse/tern.eclipse.ide.ui/icons/full/obj16 but i think it should be cool if each tern plugin host their icon (like metadata.json)

"iconurl" Well, often is not not a plugin but technology/framework icon,
so copying it into tern plugin repo is extra step.

@angelozerr
Copy link
Contributor

I think built-in plugin should appear, with "bultin": true

why do you want to display requirejs, etc although you will not able to download it? Just to display in the list available plugin, that is it?

Can we name dojotoolkit _1.6 as "plugin version file" ?

I think we should have simple JSON. So we should duplicate dojotoolkit to dojotoolkit_1.6, dojotoolkit_1.7, dojotoolkit_1.8.

OK, category currently is absent event the most full variant

With category you could categorize for instance cordovajs and tabris in the same category 'phone' for instance (not sure that it's a right name).

"iconurl" Well, often is not not a plugin but technology/framework icon,
so copying it into tern plugin repo is extra step.

For me icon, is the same thing than metadata. It helps IDE to display options (metadata) and UI (icons)

@paulvi
Copy link
Contributor Author

paulvi commented Nov 25, 2015

please comment why just closing in #561 and #438

@marijnh
Copy link
Member

marijnh commented Nov 26, 2015

I'm not going to maintain a plugins.json file. I believe I've mentioned this in other discussions. Someone else can do that in a separate repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants