Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download a bundled version of the latest release #37

Open
mrdoinel opened this issue May 13, 2015 · 2 comments
Open

Download a bundled version of the latest release #37

mrdoinel opened this issue May 13, 2015 · 2 comments

Comments

@mrdoinel
Copy link

Is there a way to download latest release of the Tooltip plugin bundled with dependencies (Tether + Drop) ?

Ideally available on the official tooltip page : http://github.hubspot.com/tooltip/docs/welcome/
So everyone can easily update it.

Cheers!

@geekjuice
Copy link
Contributor

Hi. If you actually go to the link on that site, it takes you to the releases where you can download the version you want. If you need a bundled version, you can download a < v1.0.0 release which came bundled. Starting from v1.0.0, we removed the bundled version as it was usually bundled with out of date versions of Drop and Tether as well as had many issues with others trying to use Tooltip with AMD/CJS/Require/etc. If you install Tooltip via bower, it will actually download Tether and Drop as well as Tooltip, but you will need to include them separately.

That said, I'll see how difficult it would be to provide a bundled version. The main issue was that Tether and Drop are UMD wrapped, so you can't nest UMD wrappers or provide more than one per file. I can look into having both Tether and Drop provide un-wrapped versions of themselves and using those to bundle Tooltip while providing UMD. Other than convenience though, if there a specific reason you would want this all in one file rather than managing each library individually?

@ghost
Copy link

ghost commented Mar 20, 2017

@mrdoinel You could also chain the dependencies together and load them asynchronously in parallel using Fetch Inject:

const tether = ['https://cdn.jsdelivr.net/tether/1.4.0/tether.min.js']
const drop = ['https://cdn.jsdelivr.net/drop/1.4.2/js/drop.min.js']
const tooltip = [
  'https://cdn.jsdelivr.net/tooltip/1.2.0/tooltip.min.js',
  'https://cdn.jsdelivr.net/tooltip/1.2.0/tooltip-theme-arrows.css'
]
fetchInject(tooltip, fetchInject(drop, fetchInject(tether)))
  .then(() => {
    new Tooltip({
      target: document.querySelector('h1'),
      content: "You moused over the first <b>H1</b>!",
      classes: 'tooltip-theme-arrows',
      position: 'bottom center'
    })
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants