GithubHelp home page GithubHelp logo

Comments (8)

mitar avatar mitar commented on June 10, 2024

Thanks for opening this.

from scribe.

OliverJAsh avatar OliverJAsh commented on June 10, 2024

next release will greatly reduce the dep graph of individual npm packages w/ better inlining & still offering all packages

https://twitter.com/jdalton/status/459452985290924032

from scribe.

OliverJAsh avatar OliverJAsh commented on June 10, 2024

More info on that: lodash/lodash#437 (comment)

from scribe.

guybedford avatar guybedford commented on June 10, 2024

@OliverJAsh thanks for copying me in, not sure how much I can help as I'm probably quite biased at this point, but it does sound like the fairly common package management problem.

Typically you can solve package management, multi-versioning or dynamic loading, but never all of these at the same time.

Handling multi-versions in RequireJS can certainly be done with a "@" suffix. And shortcuts to exact versions can be set up with map config or alias modules (eg require(['jquery'] -> require(['[email protected]'])). But as you say you lose Bower support here.

Have you considered an npm approach?

from scribe.

guybedford avatar guybedford commented on June 10, 2024

Perhaps consider if you can work on the build problem and package management problem, without having multi-version support first.

from scribe.

bengourley avatar bengourley commented on June 10, 2024

npm solves exactly the problem that you are describing via npm dedupe.

Due to your AMD-preference I don't know if you would be able to make use of npm without a hefty refactor, but I think the benefits are worth it. If you use node style requires then you open up the whole of the npm registry from which to consume modules, not to mention the benefits of using a proper package manager and module system!

This way your core and all of you plugins can list their own dependencies. If they are different, you will get all those that are required, and if they can depend on a common version, npm dedupe will make sure only one copy of that version exists.

It is trivial to maintain support for AMD / browser global consumers. You can simply build an AMD/global standalone bundle with $ browserify --standalone moduleName (more info here).

Hope this helps. This approach works really well for me.

from scribe.

mitar avatar mitar commented on June 10, 2024

@substack, what would be your opinion here? Use node.js+browserify?

from scribe.

OliverJAsh avatar OliverJAsh commented on June 10, 2024

@guybedford @bengourley Thanks for your input, very much appreciated. We are currently considering these options.

from scribe.

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.