GithubHelp home page GithubHelp logo

anthrax3 / poi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacksama/poi

0.0 0.0 0.0 4.27 MB

:zap: Delightful web development.

Home Page: https://poi.js.org

License: MIT License

JavaScript 95.07% Vue 0.78% CoffeeScript 0.10% Elm 0.69% HTML 3.18% TypeScript 0.18%

poi's Introduction

preview

Badges

NPM version NPM downloads Build Status donate chat

Introduction

Start writing an app with a single .js file, Poi could handle all the development setups for you, no more configuration hell.

Install Poi:

# Either globally
npm i -g poi
# Or locally (preferred)
npm i poi -D

Then populating an index.js and writing with your favorite framework like one of:

React / Preact
import React from 'react'
import { render } from 'react-dom'

const App = () => <h1>Hello React.</h1>

render(<App />, document.getElementById('app'))

Note: You need to install react react-dom and run Poi with --jsx react flag. For convenience, here's also poi-preset-react which adds both React JSX and React HMR support.

It's similar for other React-like framework.

Vue
import Vue from 'vue'

new Vue({
  el: '#app',
  render() {
    return <h1>Hello Vue.</h1>
  }
})

Note: You don't need to install any dependencies, vue is already brought by Poi. And single-file component is also supported by default.

Other

You can use existing presets such as poi-preset-riot and poi-preset-react to configure your framework to work with Poi, or contribute another preset for your desired framework.

To develop this file, run npx poi in your terminal and you can open http://localhost:4000 to preview!

So far we get:

  • Automatic transpilation and bundling (with webpack and babel/postcss)
  • Hot code reloading
  • Files in ./static are copied to dist folder, eg. static/favicon.ico to dist/favicon.ico

Build app in production mode (optimized and minified):

npx poi build

To change the path of entry file:

npx poi src/my-entry.js # development
npx poi build src/my-entry.js # production

Note that you don't need the npx prefix while using poi in npm scripts.

For full documentation, please head to https://poi.js.org

Resources

Check out awesome-poi, a curated list of awesome Poi resources.

FAQ

How's it different from a boilerplate?

It's hard to upgrade your project if you're using a boilerplate since you might change the code to suit your needs. However you can easily upgrade your project to use latest version of Poi by simply updating the dependency.

You can also get rid of boilerplate code in this way.

How does Poi manage dependencies for external frameworks?

Vue is included, other frameworks need to be installed alongside Poi in your project.

How to upgrade my app?

You can simply update poi and poi presets in your project, sometimes you might need yarn remove poi && yarn add poi --dev to ensure that poi's dependencies are updated too if you're using Yarn.

Contributing

This project exists thanks to all the people who contribute.

Please make sure to read the Contributing Guide before making a pull request.

Author

poi © EGOIST, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @_egoistlily

poi's People

Contributors

aharonp avatar alejandronanez avatar aleksueir avatar anlandu avatar arve0 avatar async0x42 avatar cbioley avatar drsensor avatar egoist avatar gluons avatar hitautodestruct avatar lucienlee avatar mblarsen avatar miljan-aleksic avatar mplewis avatar qingwei-li avatar renovate[bot] avatar sinchang avatar skiano avatar skyrpex avatar tatyshev avatar ubershmekel avatar zephraph avatar

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.