Skip to content

Download tern plugins from ternjs repository.json #195

Description

@paulvi

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.

Activity

  1. angelozerr commented on Dec 5, 2014

    @angelozerr
    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?

  2. angelozerr commented on Dec 8, 2014

    @angelozerr
    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?

  3. marijnh commented on Dec 8, 2014

    @marijnh

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

  4. paulvi commented on Dec 9, 2014

    @paulvi
    ContributorAuthor

    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

  5. added a commit that references this issue on Dec 9, 2014
  6. paulvi commented on Dec 9, 2014

    @paulvi
    ContributorAuthor

    @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

  7. angelozerr commented on Dec 9, 2014

    @angelozerr
    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?

  8. angelozerr commented on Dec 9, 2014

    @angelozerr
    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.

  9. paulvi commented on Dec 9, 2014

    @paulvi
    ContributorAuthor

    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.

  10. angelozerr commented on Dec 9, 2014

    @angelozerr
    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

  11. paulvi commented on Dec 10, 2014

    @paulvi
    ContributorAuthor

    That is #63

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

  12. marijnh commented on Dec 10, 2014

    @marijnh

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

  13. paulvi commented on Dec 11, 2014

    @paulvi
    ContributorAuthor

    @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
  14. 6 remaining items

  15. paulvi commented on Dec 11, 2014

    @paulvi
    ContributorAuthor

    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.

  16. angelozerr commented on Dec 11, 2014

    @angelozerr
    Owner

    Please explain what script should do.

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

  17. angelozerr commented on Dec 11, 2014

    @angelozerr
    Owner

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

  18. paulvi commented on Dec 11, 2014

    @paulvi
    ContributorAuthor

    sure

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

  19. angelozerr commented on Dec 11, 2014

    @angelozerr
    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?

  20. angelozerr commented on Dec 11, 2014

    @angelozerr
    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)

  21. paulvi commented on Dec 12, 2014

    @paulvi
    ContributorAuthor

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

  22. angelozerr commented on Dec 12, 2014

    @angelozerr
    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.
  23. paulvi commented on Dec 12, 2014

    @paulvi
    ContributorAuthor

    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 ?

  24. angelozerr commented on Dec 12, 2014

    @angelozerr
    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.

  25. paulvi commented on Dec 12, 2014

    @paulvi
    ContributorAuthor

    OK, that is other issue #211

  26. paulvi commented on Dec 12, 2014

    @paulvi
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions