NPM 模块收集
cross-env
https://www.npmjs.com/package/cross-env
在package.json设置环境变量的时候,会有兼容性问题,如:
{ "scripts": { "start": "APP_TYPE=site umi dev", } }
这一步,是想先设置环境变量APP_TYPE为site,然后再执行脚手架umi。
但有可能报错。所以我们需要使用cross-env,就可以解决
npm install --save-dev cross-env
{ "scripts": { "start": "cross-env APP_TYPE=site umi dev", } }
nodemon
官方网站:http://nodemon.io/
github地址:https://github.com/remy/nodemon/
简介:Nodemon 是一款非常实用的工具,用来监控你 node.js 源代码的任何变化和自动重启你的服务器。 Nodemon 是一款完美的开发工具
$ npm install -g nodemon
$ nodemon index.js
$ nodemon --inspect app.js
结合vscode调试:https://www.cnblogs.com/CyLee/p/9321571.html
nodemon --inspect app.js 结合 chrome DevTool 使用:https://www.cnblogs.com/CyLee/p/9320569.html
0、fs-extra
fs 模块的代替品,超强的io体验
https://github.com/jprichardson/node-fs-extra
var dirs = ['dist','dist/html','dist/css','dist/img','dist/js','src','src/sass','src/js','src/img','src/pic','src/sprite','psd']; dirs.forEach(function (item,index) { // 使用mkdirSync方法新建文件夹 fse.mkdirSync(path.join(PWD + '/'+ item)); })
1、anywhere
npm install anywhere -g
anywhere -h localhost -p 8060
2、inquirer (命令行交互,选择,问答的神器)
https://github.com/SBoudrias/Inquirer.js
3、node-mkdirp (其实一个命令就可以解决的事)
4、joi (似乎是一个验证库)
https://github.com/hapijs/joi
5、execa (child_process 的加强版)
https://github.com/sindresorhus/execa
https://nodejs.org/api/child_process.html
6、shelljs
https://github.com/shelljs/shelljs
7、minimist
https://github.com/substack/minimist
8、locutus (不同语言在js的实现,如php)
https://github.com/kvz/locutus
9、nodemailer
https://github.com/nodemailer/nodemailer
10、wired-elements
Wired Elements 是一系列具有手绘外观的基本 UI 元素,这些 UI 元素可以用于线框、模型等手绘风格页面。元素具有一定的随机性,像真正的手绘一样,同一个元素每次出现的显示效果不会完全相同。
https://github.com/wiredjs/wired-elements
11、warriorjs
WarriorJS 是一个采用 JavaScript 开发的教学类游戏,用于学习 JavaScript 编程和人工智能。
简单地说,WarriorJS 是一个需要靠编写 JS 来玩的小游戏,启动后你需要不断攀爬 JS 世界,最终爬上高塔获得 JS 世界的圣剑。
https://github.com/olistic/warriorjs
相关文章
- 用yarn替代npm
- 【微信小程序】-- 使用 npm 包 - API Promise化(四十二)
- 小程序使用npm以及常用的移动端UI插件
- npm link 安装本地模块,将本地模块cli化
- NPM 模块恩仇录
- npm 是干什么的
- vue开发组件并发包到npm
- npm 安装卸载模块 & ionic插件安装与卸载
- npm init 命令生成package.json文件
- npm 是干什么的
- React自定义修改脚手架配置npm run eject
- npm模块管理器
- 前端如何配置node和npm环境
- 浅析有关运行npm run serve时发生了什么的5个问题出发解析npm run的执行原理
- 浅析nodejs的require函数分别加载自定义模块和npm开源库的不同加载原理、NodeJS模块加载机制require和module的理解
- 从npm cache clean --force使用来浅析npm模块的安装机制
- [记]Windows 系统下设置Nodejs NPM全局路径
- NPM测试模块之rewire教程
- NPM 安装报 Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/xxxxxx‘ 解决
- Node.js 模块和包管理器NPM
- npm init 和npm install的区别
- npm 安装 卸载 模块;npm 安装指定版本的包(转载)
- node中npm安装模块的网络问题
- NodeJS、NPM安装配置步骤(windows版本)