Use Poi Presets from npm to Skip Configuration

John Lindquist
InstructorJohn Lindquist
Share this video with your friends

Social Share Links

Send Tweet
Published 7 years ago
Updated 6 years ago

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.

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.

egghead
egghead
~ 14 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today