Join egghead, unlock knowledge.

Want more egghead? It's 45% off for a limited time only!

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock All Content for 45% Off

Already subscribed? Sign In

Save 45% for a limited time.

Get access to all courses and lessons on egghead today.

Autoplay

    Use Poi Presets from npm to Skip Configuration

    John LindquistJohn Lindquist

    Poi provides a helpful list of presets for popular libraries which you can simply npm install and use with the poi --presets flag. By default, Poi uses a built-in Vue preset, but you can leverage he presets to help you try out new libraries such as Svelte, Riot, and Elm.

    webpackwebpack
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    Instructor: 00:00 POI provides a list of presets, which you can try out here, for example, the poi-preset-svelte. I'll install that in an empty directory, poi-preset-svelte. Then I'll go ahead and create the files I need for a Svelte demo. In app HTML, we'll create a div with a message inside of it.

    00:24 Then, in index.js, import app from my app HTML file, and then create that, so new app where the target is, my document query selector. Remember that POI gives you a template with a root div with an IDF app. I'll select that, and then data, where we set the message to, "Hello from POI."

    00:51 I'll go ahead and run this by saying poi--presets Svelte. That will look up our poi-preset-svelte we installed. You can see it launches it on 4000. I'll open that up, and you can see here we have, "Hello from POI," using the Svelte library.

    Discuss

    Discuss