Jump to content
Search Community

Tim Rijkse

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Tim Rijkse

  1. On 08/11/2017 at 2:06 PM, OSUblake said:

    Hi @jesper.landberg

     

    I know this isn't ideal, but it should work.

     

    Create a private repo. Some services like GitHub charge for that, but there are free alternatives like GitLab, BitBucket, and Visual Studio Team Services.

     

    Add the JS files npm normally installs with GSAP to that repo. It's important to use those files as their require statements are setup for a flat directory structure. Now add the the Club GreenSock plugins to that repo.

     

    Now create a package.json for that repo. Something as simple as this will do.

    
    {
      "name": "gsap",
      "version": "1.20.3",
      "main": "./TweenMax.js"
    }

     

    You should now be able to install from that repo.

    https://stackoverflow.com/questions/10386310/how-to-install-a-private-npm-module-without-my-own-registry

    https://docs.npmjs.com/cli/install

     

    And import like this.

    
    import TweenMax from 'gsap'
    import Draggable from 'gsap/Draggable'
    import ThrowPropsPlugin from 'gsap/ThrowPropsPlugin

     

     

    @OSUblake In my opinion this is the best solution however when I fork the GSAP repository and try to use my own private repository (Bitbucket) I get the following error:

     

    "These dependencies were not found: gsap".

     

    Any idea how this can happen? The 2 repositories are exactly the same :\

     

    This is how I'm loading GSAP in my package.json:

     

    "gsap": "git+ssh://git@bitbucket.org/{my-company}/gsap.git",

     

    I can see the gsap folder is present in my node_modules folder after installing, this makes it so strange.. I have no clue :)

     

    Any help is appreciated!

×
×
  • Create New...