minty-example
所属分类:数据可视化
开发工具:HTML
文件大小:910KB
下载次数:0
上传日期:2016-04-07 21:26:57
上 传 者:
sh-1993
说明: 正在尝试分步调试可视化工具minty
(Trying step by step debugger visualizer minty)
文件列表:
index.js (129, 2016-04-08)
minty-example.gif (389188, 2016-04-08)
minty.js (87, 2016-04-08)
minty (0, 2016-04-08)
minty\file (0, 2016-04-08)
minty\file\index.html (2055749, 2016-04-08)
package.json (273, 2016-04-08)
# minty-example
[Minty](https://github.com/lumpy-turnips/minty) is an awesome visualizer for your Node program's
flow.
![minty example](minty-example.gif)
## Example program
```js
// index.js
'use strict'
function add(a, b) {
a += 10
return a + b
}
function sub(a, b) {
return add(a, -b)
}
console.log(sub(2, 3))
```
Create a separate file `minty.js` that just loads `index.js`
```js
// minty.js
const minty = require('minty')
minty.file(require('path').join(__dirname, 'index.js'))
```
and install the tool itself `npm i -D minty`
Let's run!
```sh
$ node minty.js
9
```
It also created `minty/file/indexhtml` file, like this one
[index.html](minty/file/index.html)
近期下载者:
相关文件:
收藏者: