GithubHelp home page GithubHelp logo

Comments (6)

simonbrent avatar simonbrent commented on July 23, 2024

Genoverse is not ES2015 (or for that matter, any other nice recent package management-compatible style), so I can't use Rollup.

I'm afraid I don't have a good solution for you at the moment. I would suggest using the unminified code, selecting which tracks/plugins you care about, and then building your own single Genoverse file in the manner of your choosing.

from genoverse.

simonbrent avatar simonbrent commented on July 23, 2024

Ok, I've decided to go a different way on this. Instead of providing a version without jquery, and then have people's builds potentially break because of unresolved peer dependencies or version differences, I've created a version of Genoverse which internalizes jquery using $.noConfilct(true). Please try it out and let me know if it works for you:

https://github.com/wtsi-web/Genoverse/tree/internal-jquery

If you want to access Genoverse's at any time, use Genoverse.$jq.
Tracks/controllers/models/views additionally have this available as this.$jq.

from genoverse.

BurkovBA avatar BurkovBA commented on July 23, 2024

Hi, Simon, sorry for late response.

This mitigates the issue to some extent, but is not a bulletproof solution. Right away I expect the following problem:

<html>
  <head>
  </head>
  <body>
    <script src="http://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
    <script>
      $.noConflict();
    </script>
    <script>
      console.log($.fn.jquery);
      console.log(jQuery.fn.jquery);
    </script>
  </body>
</html>

Result:

test.html:11 3.3.1
test.html:12 1.12.4

As you can see, noConflict() is applied to $, but not applied to global jQuery variable.

I'm not sure that some plugin won't try using jQuery as a sinonym of $.

from genoverse.

simonbrent avatar simonbrent commented on July 23, 2024

As I said in the previous comment, I'm using noConflict(true), which relinquishes both $ and jQuery. Try it and see.

from genoverse.

BurkovBA avatar BurkovBA commented on July 23, 2024

Indeed, it works with noConflict(true). Thanks for notification, Simon, I'll test it next week and come back to you.

from genoverse.

simonbrent avatar simonbrent commented on July 23, 2024

Closing due to over 3 years of inactivity

from genoverse.

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.