UNPKG

1.73 kBMarkdownView Raw
1# wmOffline
2waimai offline dev tool
3
4[![NPM version][npm-image]][npm-url]
5[![npm download][download-image]][download-url]
6
7[npm-image]: http://img.shields.io/npm/v/wm-offline.svg?style=flat-square
8
9[npm-url]: http://npmjs.org/package/wm-offline
10[download-image]: https://img.shields.io/npm/dm/wm-offline.svg?style=flat-square
11[download-url]: https://npmjs.org/package/wm-offline
12
13##install
14```
15npm install -g wm-offline
16```
17
18##config
19add offline-config.json to the root of your project
20```
21{
22 "watch": "./examples",
23 "deploy": [
24 {
25 "receiver": "http://cp01-shimiao01.epc.baidu.com:8797/receiver.php",
26 "to": "/home/map/odp_cater/webroot/static/offline"
27 }
28 ]
29}
30```
31
32##usage
33
34wm-offline watch
35```
36start the offline dev tool and watch the change of the configtion\'s watch folder
37```
38
39
40wm-offline open
41```
42open the GUI page
43```
44
45
46wm-offline build
47```
48build the release package, resovle '<script id="wmapp"></script>' to real path.
49put the tag '<script id="wmapp"></script>' in the head front of any other js, to accelerate the NA to ready,
50in fact, the NA is ready anywhere in other js.
51```
52
53提前注入bridge
54
55+ 在header中添加标签 ```<script id="wmapp"></script>```
56+ wm-offline build
57
58##receiver
59
60php version
61https://github.com/fex-team/fis-command-release/blob/master/tools/receiver.php
62
63node version
64https://github.com/fex-team/receiver
65
66
67##release log
68
69+ 1.1.51
70```
71 1. 修复react版本冲突bug
72 2. 添加日志调试console.log功能
73```
74
75+ 1.1.47
76```
77 1. 添加wm-offline build, build打的包不会注入socket,然后会解析<script id="wmapp"></script>
78 2. 离线协议修改,url -> downloadUrl
79 3. 添加统计
80```
81
82##tips
83
84mac 下杀进程的方法
85
86lsof -i tcp:8088
87
88kill -9 进程id
89
\No newline at end of file