Code Monkey home page Code Monkey logo

Comments (4)

mattgperry avatar mattgperry commented on May 22, 2024

Yeah I am definitely up for this, just a couple things I'm confused about though.

The entry point - is Bower used then, largely to concatenate JavaScript rather than manage modules in an npm, modular fashion? Because with npm the entry point is set to module.js so you have to explicitly import it into your packages, whereas with global you're adding it to the global namespace. So I'm asking this because they're two very different ways of using it and I'm wondering if I change the entry point I break it for people who use it in a modular fashion?

The git tags - if I run, in my project root, git tag, I see every version tag listed. If I go to the tags section of GitHub I only see up to 0.30.0. Is there something in particular I need to do to get these tags up on GitHub?

Thanks for your help.

from popmotion.

cmalven avatar cmalven commented on May 22, 2024

The Bower main property is complicated and confusing. The maintainers of Bower can't even decide among themselves how it should be used (see this conversation that went on for multiple years), but the most popular modules that pull in bower dependencies (like wiredep and main-bower-files) work by looking at the main for every installed package and every packaged in the dependency tree for every installed package. They don't actually (as far as I'm aware) follow any dependencies specified in the code, like require statements, so they don't work nearly as reliably as npm/CommonJS for building dependencies.

And package authors are so inconsistent with how they use main doesn't seem like it could be used reliably as an npm-style package management system. That's all a long-winded way of saying you're right, I can't guarantee that changing your main wouldn't break the way some people are using Bower, I just know that the current way its being used won't work with the most popular bower-centric build tools I know of.

But even if you leave it the way it is (which is totally cool), you should still update the tag, which you can do with:

git push origin master && git push --tags

In the future, if you want, you can automatically update your bower.json file version and create a new tag with bower version 1.x.x, then run the above command to push the tags to github.

If the tags are at least correct, someone can bower install popmotion then update their bower.json file like so to get it working:

  "overrides": {
    "popmotion": {
      "main": "popmotion.global.js"
    }
    …

from popmotion.

cmalven avatar cmalven commented on May 22, 2024

BTW, I like Popmotion. Nice work!

from popmotion.

mattgperry avatar mattgperry commented on May 22, 2024

Ah great explanation! I'm convinced we should change it, in fact I already have. When I got to my current job they were using Bower simply to concatenate files and the previous entry point wouldn't have worked in that instance either.

Thanks for the tag tip - I've push all my tags now so hopefully that'll work for you.

from popmotion.

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.