Open XBDRX opened 9 years ago
You can add the GSAP lib to your project (in a /vendor/greensock/
dir, for example), and then require it:
require('gsap-react-plugin');
var TweenLite = require('./vendor/greensock/TweenLite');
var TimelineLite = require('./vendor/greensock/TimelineLite');
@XBDRX GSAP is also available as an npm package so you can install it this way, and then require it like you require gsap-react-plugin
.
I'm able to use TweenLite and TimelineLite successfully if I do the following
[.jsx]
var gsap = require('gsap-react-plugin');
[index.html]
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
However, I'd like to be able to require TweenMax.min.js instead of including it directly in the .html file. Am I missing something simple, and if not, is it possible to add instructions on how to do this to the readme file?
Thanks!