Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Dave Stewart

Uncompressed files on cloudflare?

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Would be useful for debugging purposes to be able to link to uncompressed libraries.

 

 

Link to comment
Share on other sites

I believe they frown on that sort of thing for the CloudFlare CDN. Sorry :(

Link to comment
Share on other sites

Shame. 

FYI, I wanted to know what kind of object was firing a callback, but because the files were compressed, and GSAP doesn't use prototypes, and console.log() dumps generic Objects.

 

Setting a breakpoint and stepping into the function obviously displays minified code, which is pretty impenetrable.

 

Is there a way to quickly tell what object it is? Timeline or Tween?

Link to comment
Share on other sites

Hi Dave, why don't you load the files locally, not from CDN when you develop? I use Codekit2 in my projects and it can output source maps, this is other option.

 

I just uploaded a list of sourcemaps you can use to debug minified code, it is for latest version of GSAP:

 

http://cloud.bassta.bg/gsap-sourcemaps/

  • Like 1
Link to comment
Share on other sites

Hey Chryso,

 

Yeah, that's what I do. This was for CodePen demos, actually!

The other option of course would be to link to uncompressed files on my own site.

 

Cheers,

Dave

Link to comment
Share on other sites

I'm curious what you meant by "GSAP doesn't use prototypes" (it uses prototypes all over the place but I suspect I misunderstood what you meant). And yeah, loading files either locally or from your server is probably best because that gives you the ability to actually make edits too, dropping console.log() into various spots or whatever which you couldn't do if it was on a CDN. 

 

Plus the whole point of a CDN is for deployment (not development), so we want to minimize the chances of folks accidentally loading the large source files and putting a heavier burden on the CDN itself. 

Link to comment
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.
×