Giter VIP home page Giter VIP logo

Comments (6)

andreasgrimm avatar andreasgrimm commented on July 18, 2024

I guess it's due to a missing alias in the registry.json file .. so the repo name gets used as an alias per default.
But as you'd commit the config.js file into your application repo anyways, you could just change the name in your config file as you see fit.

A missing package.json file in the github repo shouldn't be a problem, e.g. see https://github.com/angular/bower-material which doesn't have one either .. and the repo entry works just fine.

I'd suggest to submit a PR with an appropriate alias name. Speaking of which, what about all lower case flowtype? It'd fit much better because all existing alias entries are lower case as well.

from registry.

Aaike avatar Aaike commented on July 18, 2024

well the bower-material package works just fine because there is already an override for it in this registry. but there isn't one yet for flowtype, that's why i want to submit the PR :)

I do like the all lowercase naming , but i just went with what the author named it and removed the .JS
I will submit is as flowtype

but how do i do that ?
you mentioned submitting a pr with an alias name.
does that mean i should put the contents of the package.json i created into a file :

package-overrides/github/simplefocus/[email protected] ?

would that allow the flowtype package to be installed and required as flowtype ?
(it's my first time submitting something to this repo)

edit: and then add an entry in the registry file like this ?

"flowtype": "github:simplefocus/flowtype"

from registry.

andreasgrimm avatar andreasgrimm commented on July 18, 2024

@Aaike the PR should include a modified registry.json (with the alias <-> endpoint mapping added, e.g. "flowtype": "github:simplefocus/FlowType.JS",) and a new file package-overrides/github/simplefocus/[email protected]. my apologies if I wasn't specific enough.

note: the endpoint name as well as the file for the override must match the exact user/org name and repo name. In this case you have to append the .JS in both cases.
Only in the alias is where we can choose a different (and hopefully simpler to use) name.

yes, put the contents into the override file. Actually you don't need all of the properties you specified in your file. Maybe take a look at https://github.com/jspm/registry/blob/master/package-overrides/github/angular/bower-material%400.6.0.json

Be sure to change the name to lowercase in your override as well ...

"shim": {
        "flowtype": {
            "deps": ["jquery"]
        }
    }

... as it relates to the alias we specified in registry.json.

yes, that allows the flowtype package to be installed and required as flowtype.

So all in all the override file content could look something like this:

{
  "main": "flowtype",
  "shim": {
    "flowtype": {
      "deps": [
        "jquery"
      ]
    }
  },
  "registry": "jspm",
  "dependencies": {
    "jquery": "jquery@^2.1.2"
  }
}

I hope this helps.
It would be helpful to know if you think that the docs over at https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm could be improved in some way :)

from registry.

Aaike avatar Aaike commented on July 18, 2024

The docs are pretty clear :) i was just confused i guess about how to change the alias
thx for the explanation , i submitted a PR, i hope it is correct now :)

from registry.

Aaike avatar Aaike commented on July 18, 2024

damn.. i just copied your configuration , which had jquery 2.1.2 in it , but now that is failing , because github:components/jquery is at 2.1.1

but jquery itself is at 2.1.2...
ah well ... the component version will get updated pretty soon i guess :)

from registry.

guybedford avatar guybedford commented on July 18, 2024

@Aaike it may well be possible to send a PR to that repo to speed things up if you need, otherwise feel free to alter the override back to 2.1.1 in the mean time.

from registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.