Skip to content

Instantly share code, notes, and snippets.

@cmalven
Created July 18, 2014 18:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmalven/2cb8d0494d94f1459d3c to your computer and use it in GitHub Desktop.
Save cmalven/2cb8d0494d94f1459d3c to your computer and use it in GitHub Desktop.
Browserify Shim with GSAP
TimelineLite = require('timelineLite')
...
myTimeline = new TimelineLite;
// Console outputs "Uncaught TypeError: undefined is not a function"
{
...
"browser": {
"waypoints": "./bower_components/jquery-waypoints/waypoints.js",
"timelineLite": "./bower_components/gsap/src/uncompressed/TimelineLite.js"
},
"browserify": {
"transform": [
"browserify-shim",
"coffeeify"
]
},
"browserify-shim": {
"waypoints": {
"exports": "waypoints",
"depends": [
"jquery:jQuery"
]
},
"timelineLite": "TimelineLite"
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment