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

Download tern plugins from ternjs repository.json #195

Open
paulvi opened this issue Dec 5, 2014 · 29 comments
Open

Download tern plugins from ternjs repository.json #195

paulvi opened this issue Dec 5, 2014 · 29 comments
Labels

Comments

@paulvi
Copy link
Contributor

paulvi commented Dec 5, 2014

started as discussion in #190

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.

@angelozerr
Copy link
Owner

@paulvi I have commited the wizard which download tern plugin :

Select Tern -> Download Tern Modules :

downloadmodule_1

It open the wizard which loads from HTTP the repository.json (for the moment wizard uses https://github.com/angelozerr/tern.java/blob/master/eclipse/tern.eclipse.ide.tools.ui/TO_DELETE/repository.json but after it will use http://ternjs.net/repository.json) :

downloadmodule_2

Now we must download the tern module. how to do that ? With npm? With Java code?

@angelozerr
Copy link
Owner

Perhaps we should rename repository.json to marketplace.json ?

I think it should be cool to have a simple HTML page http://ternjs.net/marketplace.html which load JSON http://ternjs.net/marketplace.json to have this kind of UI http://marketplace.sarah.encausse.net/store

@paulvi @marijnh what do you think about this idea?

@marijnh
Copy link

marijnh commented Dec 8, 2014

'Marketplace' suggests commercial selling. I think just calling it 'plugins.json' would be clearest.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 9, 2014

plugins.json

👍 That is nice. Word "repository" may mean git repository

I think it should be cool to have a simple HTML page

that is ternjs/tern#431
once there is plugins.json ternjs/tern#424

paulvi pushed a commit to paulvi/tern.java that referenced this issue Dec 9, 2014
as it is plugins.json
@paulvi
Copy link
Contributor Author

paulvi commented Dec 9, 2014

@paulvi I have commited the wizard which download tern plugin :

Select Tern -> Download Tern Modules :

Is this wizard for end users?

I will try to use
https://github.com/paulvi/tern-plugins/blob/master/plugins.json

@angelozerr
Copy link
Owner

I think just calling it 'plugins.json' would be clearest.

In tern.java we decided to use tern modules to name plugins & JSON Type Definition. If we use 'plugins.json', it means that we have only list of plugins and not JSON Type Definition, correct?

@angelozerr
Copy link
Owner

Is this wizard for end users?

It's just a POC, any feedback are welcome!

I will try to use
https://github.com/paulvi/tern-plugins/blob/master/plugins.json

It should work.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 9, 2014

it means that we have only list of plugins and not JSON Type Definition, correct?

isn't JSON Type Definition a part that plugin can have?

For end users having one word would make life simpler.

@angelozerr
Copy link
Owner

isn't JSON Type Definition a part that plugin can have?

yes

For end users having one word would make life simpler.

that's why we use tern modules inside tern.java

@paulvi
Copy link
Contributor Author

paulvi commented Dec 10, 2014

That is #63

Can @marijnh share the same view on modules vs plugins ?

@marijnh
Copy link

marijnh commented Dec 10, 2014

I use the word 'plugin'. I really don't care at all what word other interfaces use.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

@angelozerr I tried 0.8 using URL https://raw.githubusercontent.com/paulvi/tern-plugins/master/plugins.json

  • should show what plugins are already installed
  • should show total numbers of entries in the table, (we are close to 30 now)
    e.g. "29 in repository, 15 already used"
  • should have button Download that will download selected entries, without closing the dialog
  • have history of used URLs
  • And it seems that this is actually not New Wizard, but closer to
    File -> Import ...
    or Help -> Install section

@angelozerr
Copy link
Owner

@paulvi I agree with your comment, but I think we should develop download (with npm) to validate the plugins.json and create a PR for ternjs

I would liek to finish the plugins.json (see my comments ternjs/tern#438 (comment))

@angelozerr
Copy link
Owner

And it seems that this is actually not New Wizard, but closer to File -> Import ...

done

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

.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 #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.

Where to start? I can use repository.url
Where to put?

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

@angelozerr
Copy link
Owner

added to https://github.com/angelozerr/tern.java/wiki/New-and-Noteworthy-0.8.0

I'm not sure that it's a good idea. The download feature is not implemented, I set feature in N&N when it is finished.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

I'm not sure that it's a good idea.

well, if snapshots are provided and promoted, there should be docs for them.

if a feature is not good for release, its description may jump into text N&N

Where to start? I can use repository.url
Where to put?

Please explain what script should do.

@angelozerr
Copy link
Owner

Please explain what script should do.

I try do something. I contact you as soon as I will commit.

@angelozerr
Copy link
Owner

@paulvi I would liek to rename "Download tern modules" wizard by "Install tern modules". Are you OK with that?

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

sure

import is usually only once, while install usually includes update operation

@angelozerr
Copy link
Owner

import is usually only once, while install usually includes update operation

I I would like to rename "Download tern modules" wizard by "Install tern modules" and keep it to File / Import... Is it ok?

angelozerr added a commit that referenced this issue Dec 11, 2014
angelozerr added a commit that referenced this issue Dec 11, 2014
@angelozerr
Copy link
Owner

@paulvi I have commited my work which download tern plugin with npm when you click on Finish.

Eclipse console shows log of npm install.

It's a first version of download with npm. I know that there are a lot of bugs! This wizard must be improved a lot (close wizard if no errors, npm path should be customized with preferences, etc)

Note that only CordovaJS works (because it was published)

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

Please point to script from README or wiki, as that script is to be useful even without tern.java

@angelozerr
Copy link
Owner

Please point to script from README or wiki, as that script is to be useful even without tern.java

It's npm :

  • cd to your tern folder
  • npm install tern-cordovajs to install cordovajs tern plugin.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

That installs next to tern inside node_modules

https://github.com/angelozerr/tern.java/tree/master/core/tern.core/node_modules/

..
.bin
tern
tern-cordovajs

Have you thought to rename node_modules into ternjs and configure it as project for editing ?

@angelozerr
Copy link
Owner

@paulvi I'm a little newbie with nodejs, so any feedback are welcome.

Today the whole tern plugins are hosted inside https://github.com/angelozerr/tern.java/tree/master/core/tern.core/node_modules

I have not used npm for that, just copy/paste those tern plugins. So if you think those folder should be redone, don't hesitate to tell me. I think too this https://github.com/angelozerr/tern.java/tree/master/core/tern.core/node_modules should be deleted and move to a new Eclipse project tern.repository which hosts those tern plugins.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

OK, that is other issue #211

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

Now back to downloading script.

It may use npm as implementation detail to get modules from npm registry or GitHub repo.

I am just not user if it is right for tern to get plugins under node_modules.
That would be 3rd folder to existing defs and plugin

I would like to see plugins folder (like Eclipse)

or download plugins into plugin ...

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

No branches or pull requests

3 participants