Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Kristian Johansen

DrawSVGPlugin with Nuxt and GSAP 3

Recommended Posts

Hello, 

 

I have a question regarding the DrawSVGPlugin. I want to make sure it's possible to import the plugin into a Nuxt.js / Vue.js project before I purchase it? Is there anyone in here that has experience with that?

 

I'm using GSAP 3 

 

I hope someone can help. 

 

Thanks,

Kristian

 

 

Share this post


Link to post
Share on other sites

Hey Kristian,

 

You can include GSAP in a Nuxt project without issue :) Simply install GSAP then say 

import { gsap } from "gsap/dist/gsap";

 

Share this post


Link to post
Share on other sites

Thanks @ZachSaucier I've done that and that works perfectly, but that doens't include the DrawSVGPlugin right? Do I then purchase and add the file manually in to the gsap folder in my node_modules ? 

Share this post


Link to post
Share on other sites
25 minutes ago, Kristian Johansen said:

Do I then purchase and add the file manually in to the gsap folder in my node_modules ? 

 

No, you download a file that you install.

https://greensock.com/docs/v3/Installation#npm

 

npm install ./gsap-bonus.tgz

 

Nuxt doesn't use es-modules by default. Read through this entire thread.

 

 

 

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Thanks @OSUblake done that now. I'm already using the scrollToPlugin and that is working perfect. But still don't see the DrawSVGPlugin in the gsap folder after installing the bonus-tgz. I assume I just have to buy it and copy it in to that folder, and hopefully I can register it like I register the other plugins. 

 

 

Share this post


Link to post
Share on other sites
2 minutes ago, Kristian Johansen said:

I assume I just have to buy it and copy it in to that folder, and hopefully I can register it like I register the other plugins. 

Correct :) 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Kristian Johansen said:

But still don't see the DrawSVGPlugin in the gsap folder after installing the bonus-tgz

 

Um. After installing what bonus-tgz? You can't install something that doesn't exists. That should have given you an error.

 

The gsap-bonus.tgz is a special file that you can download once you buy it. You copy the gsap-bonus.tgz file into your project, and then use npm or yarn to install it. You DON'T copy any files into your node_modules folder.

 

Importing DrawSVGPlugin will work just fine. I've done it hundreds of times.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks got it to work now. I just wanted to be sure that it was working with my setup. 

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×