Custom CDN Url
If called without arguments, it fetches GSAP from CDN.
setup().then(() => {
// gsap is fetched and loaded from CDN
})
By default GSAP is fetched from unpkg.com, however you can customize the auto inject url by
setting the spirit.config.spirit.autoInjectUrl
before calling spirit.setup()
.
Example:
spirit.config.gsap.autoInjectUrl = 'https://myhost.com/custom-gsap.js';
spirit.setup().then(() => {
// GSAP is fetched from custom url
});
Config Options
import spirit from 'spiritjs'
/**
* GSAP 3 instance.
*
* @type {object}
*/
spirit.config.gsap.instance
/**
* Use auto inject?
*
* @type {Boolean}
* @default true
*/
spirit.config.gsap.autoInject
/**
* CDN url to fetch from.
*
* @type {String}
* @default https://unpkg.com/gsap/dist/gsap.min.js
*/
spirit.config.gsap.autoInjectUrl