Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Michael Barsotti

latest version number

Recommended Posts

I have a node script that generates banner boilerplate files for my banner developers. I'm wondering if there is a way to ping the GreenSock website and get the latest version number.

 

Thank you

Share this post


Link to post
Share on other sites

Hey Michael.

 

We don't have an API endpoint or anything. We always update the same file though so maybe you could make use of that fact? [REDACTED]

 

We also update the URL in the homepage so you could scrape that.

Share this post


Link to post
Share on other sites

so if all of my HTML script src tags point to [REDACTED], add-ins, club member files, etc. I would get the latest every time?

replace

 <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.6/ScrollToPlugin.min.js"></script>

with

 <script src="[REDACTED]"></script>

 

 

Share this post


Link to post
Share on other sites

sorry, not club member files, but base files?

Share this post


Link to post
Share on other sites

No, don't use them as a CDN. I was saying maybe you could parse it for the version ninety but thinking of it now that probably wouldn't work. 

 

You could probably use a CDN like jsdeliver or cdnjs to get the latest version. I know CodePen does that through an API.

Share this post


Link to post
Share on other sites

OK, I'm sorry, I've some coffee now. {redacted}

Share this post


Link to post
Share on other sites

I would actually recommend the CDN option. Though I'm not familiar with their APIs.

Share this post


Link to post
Share on other sites

No no no, PLEASE don't link to anything on this domain! We may move things and sometimes we try beta versions. Plus we do NOT want mission-critical sites depending on our local file here. That happened once where a banner ad was linking directly to a file on our server (without our knowledge or consent) and it caused MAJOR problems for everyone. It brought our site to its knees (massive traffic) and we had to yank the file down (which of course broke their banner). 

 

I have redacted the URL from this thread, just so others don't stumble upon it and try using it. 

 

Definitely use a CDN as Zach suggested in his last post. 👍  Or I guess even Github could work. 

  • Like 1

Share this post


Link to post
Share on other sites

Thank you, I removed my code from my earlier post, I will use https://api.cdnjs.com/libraries/gsap?fields=version. this is exactly what I was looking for.

 

A new question. My employer is a GreenSock business member, if I mix old versions of the business green files with latest gsap from the cdn will that cause a problem since those files are included in our projects? I imagine it will but you guys are great with backwards compatibility so I thought I'd ask.

  • Like 1

Share this post


Link to post
Share on other sites
42 minutes ago, Michael Barsotti said:

Thank you, I removed my code from my earlier post, I will use https://api.cdnjs.com/libraries/gsap?fields=version. this is exactly what I was looking for.

Perfect, thanks!

 

42 minutes ago, Michael Barsotti said:

My employer is a GreenSock business member, if I mix old versions of the business green files with latest gsap from the cdn will that cause a problem since those files are included in our projects? I imagine it will but you guys are great with backwards compatibility so I thought I'd ask.

The plugin structure totally changed in the major version release (version 3), so you couldn't use v2 plugins with a v3 core for example. Of course it's always best to use the latest stuff if possible. We keep improving things :) But yeah, we work very hard to maintain backwards compatibility whenever possible. 

  • Like 1

Share this post


Link to post
Share on other sites

Oh, no, I didn't mean mixing v2 and v3, I meant mixing 3.2.1 member files with 3.3.4 core.

Share this post


Link to post
Share on other sites
4 hours ago, cmb said:

Oh, no, I didn't mean mixing v2 and v3, I meant mixing 3.2.1 member files with 3.3.4 core.

Oh, absolutely. Yes, that should work just fine. The only exception is for a new plugin like ScrollTrigger which required some additions to the core to integrate - you couldn't, for example, use ScrollTrigger with GSAP 3.0.0. ScrollTrigger needs 3.3.0 or later, but that's a very rare exception. Pretty much all the other plugins I can think of have no such limitation. 

  • Like 2

Share this post


Link to post
Share on other sites

I updated my node script and calling the cdn is working beautifully, thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×