Jump to content
Search Community

How to install GSAP locally?

Serhat Düzgün test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

I have done the installation steps. I tried every way but I can't run it in HTML file. Even if I throw the gsap file in the "node_modules" section and call it with the <script> tag, it doesn't work.

 

This is how I call "all.js" in HTML file. Tried all other ways too.

<script src="src/all.js"></script>
<script src="app.js"></script>
Link to comment
Share on other sites

  • Solution

Welcome the forums @Serhat Düzgün

 

That all.js file is for modules, which is probably not what you want. You should just link to all the .min.js files in the minified folder.

 

Ex...

<html>
  <body>
    <h1>Some content</h1>
    <script src="path-to-my-scripts/gsap.min.js"></script>
	<script src="path-to-my-scripts/ScrollTrigger.min.js"></script>
    <script src="app.js"></script>
  </body>
</html>

 

  • Like 3
Link to comment
Share on other sites

10 minutes ago, OSUblake said:

Welcome the forums @Serhat Düzgün

 

That all.js file is for modules, which is probably not what you want. You should just link to all the .min.js files in the minified folder.

 

Ex...

<html>
  <body>
    <h1>Some content</h1>
    <script src="path-to-my-scripts/gsap.min.js"></script>
	<script src="path-to-my-scripts/ScrollTrigger.min.js"></script>
    <script src="app.js"></script>
  </body>
</html>

 

I had it done two minutes before I saw your reply. Thank you so much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...