一个程序大部分时间用来做运算逻辑判断称为CPU密集 一个程序大部分时间用来做存储设备,网络设施的一些读取操作称作为I/O密集
Web Server、本地代码构建、使用工具开发
-
Inspector NodeJS自带的调试
-
VS Code
-
.gitignore 参考文档 https://git-scm.com/docs/gitignore
-
.npmignore 在npm里一些文件在发布时不是必须的我们也可以忽略掉 参考文档 https://docs.npmjs.com/misc/developers
-
.editorconfig 团队开发中同一个项目多个人维护可能大家的编辑器不一样,没有统一的约定,例如有的人习惯两个空格、有的人习惯tab、有的人习惯四个空格,为了项目的风格能够统一可以采用editorConfig保持持续的代码风格 参考文档 http://editorconfig.org/
-
.eslintrc eslint用于代码审查 参考文档 http://eslint.cn/docs/user-guide/configuring#configuration-file-formats eslint可以结合pre-commit插件使用 目的是在package.json 的scripts之前对一些指定的命令提前运行, 相当于一个勾子, 例如:
//npm install --save-dev pre-commit
//package.json 文件
"scripts": {
"dev": "node app",
"lint": "eslint .",
"fix": "eslint --fix ."
},
"pre-commit": [
"fix",
"lint"
],
//执行git commit -m 'test' 提交代码时 会先执行pre-commit中的代码- .eslintignore 用于忽略某些文件