node-uuid
参考:https://www.jianshu.com/p/0388e3d4bed4
常见用法:
- uuid.v1(); —>基于时间戳生成 (time-based)
- uuid.v4(); —>随机生成 (random)
const uuid = require('node-uuid');
const uid = uuid.v1()
live-server
live-server 是一个具有实时加载功能的小型服务器.
用法:在所在项目目录下,打开命令行工具,输入 live-server,回车就可以了(注意这里默认打开的是index.html)
cd /home/gmx/test-html/
live-server
zx
超级好用的写脚本神器
地址:https://github.com/google/zx
用法:
#!/usr/bin/env zx
await $`cat package.json | grep name`
let branch = await $`git branch --show-current`
await $`dep deploy --branch=${branch}`
await Promise.all([
$`sleep 1; echo 1`,
$`sleep 2; echo 2`,
$`sleep 3; echo 3`,
])
let name = 'foo bar'
await $`mkdir /tmp/${name}`