I'm using Greensock in an Angular app. The standard GSAP components I can all import normally through NPM. I've also gotten the Business Green plugins to work by dumping them into the GSAP folder in my node_modules and doing something like this:
import CustomWiggle from 'gsap/CustomWiggle';
I would very much like a cleaner solution than copying files into node_modules by hand. What would be the best way to import these files into my project?
Hi @jorma
Are you using the Angular CLI? If so, you can just add your scripts to the .angular-cli.json file, and it will import them for you.
"scripts": [
"assets/gsap/TweenMax.js",
"assets/gsap/plugins/DrawSVGPlugin.js"
]
https://github.com/angular/angular-cli/wiki/stories-global-scripts