# 2019.07.22

[视频] 张维为教授:防火墙是中国政府的智慧。可以翻墙,但是墙必须要有:https://www.youtube.com/watch?v=YtxhWwpcwD0 (opens new window)

[文章] 使用 TS+React 开发 Chrome 扩展:https://medium.com/@th.guibert/create-a-chrome-extension-using-react-and-typescript-50e94e14320c (opens new window)

[类库] npm-run-all 用于并行或顺序执行多个 NPM 脚本的工具:https://github.com/mysticatea/npm-run-all (opens new window)

[类库] decamelize 可以把驼峰字符串,转换成横线分割符的类库,看一下代码示例就明白了:https://github.com/sindresorhus/decamelize (opens new window)

[类库] sort-package-json 可以生成一个 package.json 的文件,默认是按照 NPM 标准顺序输出,可以用于动态生成脚手架的项目配置:https://github.com/keithamus/sort-package-json (opens new window)

[资源] 最全中华古诗词数据库,唐宋两朝近一万四千古诗人,接近 5.5 万首唐诗加 26 万宋诗。两宋时期 1564 位词人,21050 首词,还有小程序 (opens new window)https://github.com/chinese-poetry/chinese-poetry (opens new window)

# 示例 - npm-run-all

{
  // ...
  dependencies: {
    "start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve",
  },
}

# 示例 - sort-package-json

JSON.stringify(sortPackageJson({
  dependencies: {},
  version: '1.0.0',
  keywords: ['thing'],
  name: 'foo',
}), null, 2)
/* string:
{
  "name": "foo",
  "version": "1.0.0",
  "keywords": [
    "thing"
  ],
  "dependencies": {}
}
*/

# 示例 - decamelize

const decamelize = require('decamelize');

decamelize('unicornRainbow');
//=> 'unicorn_rainbow'

decamelize('unicornRainbow', '-');
//=> 'unicorn-rainbow'

# 今日图 - 自我递归

Last Updated: 7/22/2019, 1:50:16 PM