GithubHelp home page GithubHelp logo

Just using it... about flamethrower HOT 4 OPEN

fireship-io avatar fireship-io commented on August 16, 2024
Just using it...

from flamethrower.

Comments (4)

ekwoka avatar ekwoka commented on August 16, 2024 4

Or even use

<script type="module">
  import flamethrower from 'https://esm.sh/v90/flamethrower-router'
  flamethrower({ log: true, pageTransitions: true });
</script>

To use an ESM cdn to play around with.

@Oskar1504 Just a tip: type="module" is automatically deferred. Technically you can have async modules but not blocking modules, so defer is default.

from flamethrower.

Oskar1504 avatar Oskar1504 commented on August 16, 2024 2

Insert in your <head></head>

<script defer type="module">
    import flamethrower from '/flamethrower.js';
    flamethrower({ log: true, pageTransitions: true });
</script>

Use <a href="/test"></a> elements as always.
Should work

from flamethrower.

will-abule avatar will-abule commented on August 16, 2024 1

Insert in your <head></head>

<script defer type="module">
    import flamethrower from '/flamethrower.js';
    flamethrower({ log: true, pageTransitions: true });
</script>

Use <a href="/test"></a> elements as always. Should work

just a little addition clone it and run npm run build to generate the main.js bundle, then use it in a module script.

from flamethrower.

DarrenSem avatar DarrenSem commented on August 16, 2024

How about an example/video on how to use it without npm...

@IBIT-ZEE
Below examples use import AKA they presume ES6 modules.

You could also include from unpkg, since Jeff published this to npm:

<script href="https://unpkg.com/[email protected]/dist/main.umd.cjs">

URL found via the ending-slash trick:
https://unpkg.com/flamethrower-router/

NOTE: I haven't tried this yet, but it seems to use the standard Universal Module Definition

from flamethrower.

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.