Coder Social home page Coder Social logo

unpkg support about auto-animate HOT 5 CLOSED

formkit avatar formkit commented on May 22, 2024 1
unpkg support

from auto-animate.

Comments (5)

justin-schroeder avatar justin-schroeder commented on May 22, 2024

Hmm, seems to work just fine for me?

https://codesandbox.io/s/priceless-thunder-m89xo6?file=/src/main.js

Is there a specific build setup you are using?

from auto-animate.

galtenberg avatar galtenberg commented on May 22, 2024

Hi @justin-schroeder – I'm not seeing use of unpkg in that example...

unpkg is used for no-build scenarios, where an entire package can be retrieved within an html page.

Code in an html page typically looks like:

<script type="module">
 
import { children, html, define, property, dispatch } from 'https://unpkg.com/[email protected]/src'
import { fileOpen, directoryOpen, fileSave } from 'https://unpkg.com/browser-nativefs'
import autoAnimate from 'https://unpkg.com/@formkit/auto-animate'

// now use those imported functions in javascript

// just autoAnimate currently doesn't work

unpkg is just one way this is done – it's automatically provided for every package in npm.

It's just an extremely useful convenience for many situations. Supporting code-only imports sometimes requires a bit of structuring of the module such that functions work once they are imported this way.

It's not vital to solve for right now, except that it may instruct how module(s) best be defined (saves later refactors).

Thanks for considering 🍺

from auto-animate.

justin-schroeder avatar justin-schroeder commented on May 22, 2024

Sorry mate, I pasted the wrong url, wasn't even at code sandbox 😂 here's what I was trying to link to:

https://stackblitz.com/edit/web-platform-edhnls?file=index.html

from auto-animate.

justin-schroeder avatar justin-schroeder commented on May 22, 2024

@galtenberg perhaps you can provide a reproduction on stackblitz or other location where its not working and we can go from there.

from auto-animate.

galtenberg avatar galtenberg commented on May 22, 2024

Confirmed the example works for me, might have a different issue to report if I can isolate. Thanks for the test!

from auto-animate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.