码迷,mamicode.com
首页 > 编程语言 > 详细

[Poi] Use Poi to Build an Index.js with Modern JavaScript Features

时间:2018-01-02 18:50:47      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:rom   with   ble   int   when   imp   div   --   mod   

Poi can easily launch an index.js file simply by running the poi command. This will launch a dev-server and automatically reload whenever you make changes. You can also npm install any package you need and import it right away.

 

Install:

npm install -g poi

 

Code:

// src/index.js

import {Observable} from ‘rxjs‘;

Observable.intervable(1000).subscribe(
  i = > document.getElementById("app").innerHTML = `
      <h1>{i}</h1>
`
)

 

Run:

poi src/index --port 3000

 

[Poi] Use Poi to Build an Index.js with Modern JavaScript Features

标签:rom   with   ble   int   when   imp   div   --   mod   

原文地址:https://www.cnblogs.com/Answer1215/p/8178249.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!