前端常用node包

以下列举了一些前端常见node包,包括项目中引入的包和编译使用到的包,排除了知名的框架库、UI库或者工具库。开发用常见于 package.json 的 dependency 中,编译用常见于 package.json 的 devDependecy 中。

开发用:
big.js: A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic
brace: browserify compatible version of the ace editor.
classnames: A simple utility for conditionally joining classNames together
pako: zlib port to javascript - fast, modularized, with browser support
crypto-js: JavaScript library of crypto standards.
day.js: 2KB immutable date time library alternative to Moment.js with the same modern API
dom-to-image: Generates an image from a DOM node using HTML5 canvas and SVG
echarts: Apache ECharts is a powerful, interactive charting and data visualization library for browser
echarts-gl: Extension pack of ECharts providing 3D plots and globe visualization
encryptlong: js encrypt
file-saver: An HTML5 saveAs() FileSaver implementation
handsontable: Handsontable is a JavaScript Spreadsheet Component available for React, Angular and Vue.
immutability-helper: https://github.com/kolodny/immutability-helper#readme
localForage: Offline storage, improved.
lodash: Lodash modular utilities.

编译用:

cross-env: Run scripts that set and use environment variables across platforms
eslint: An AST-based pattern checker for JavaScript.
husky: Modern native Git hooks made easy
prettier: Prettier is an opinionated code formatter
stylelint: A mighty CSS linter that helps you avoid errors and enforce conventions.
cssnano: A modular minifier, built on top of the PostCSS ecosystem.
autoprefixer: Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
assert: The assert module from Node.js, for the browser.
buffer: Node.js Buffer API, for the browser
chalk: Terminal string styling done right
crypto-browserify: implementation of crypto for the browser
browserify-zlib: Full zlib module for the browser
fs-extra: fs-extra contains methods that aren’t included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.
get-port: Get an available port
glob: the most correct and second fastest glob implementation in JavaScript
ip: IP address tools for node.js
minimist: parse argument options
path-browserify: the path module from node core for browsers
stream-browserify: the stream module from node core for browsers
url: The core url packaged standalone for use with Browserify.
util: Node.js’s util module for all engines
vm: vm module for the browser
inquirer: A collection of common interactive command line user interfaces.
unzipper: Unzip cross-platform streaming API
rimraf: The UNIX command rm -rf for node.

node server常用npm库

以下列举一些 node server 常用npm库:

  • express: nodejs server web框架
  • koa: nodejs server web框架 采用es6 async调用方式
  • mongoose: MongoDB 对象建模库
  • connect-mongo: MongoDB 会话存储库(连接池),支持Express
  • co: 基于es6的generator及yield用同步的形式编写异步代码
  • dotenv: 从.env文件自动加载环境变量
  • nodemon: node守护进程
  • pm2: nodejs应用生产环境进程管理库
  • npm-check-updates: 检查package是否有新版本
  • npm-check: 检查package是否有过时版本
  • passport: 身份认证库
  • passport-local: 身份认证本地认证策略
  • helmet: 通过修改header来减少安全问题的库
  • winston: 生产环境日志记录
  • nock: HTTP 服务器请求模拟库
  • body-parser: body解析 express中间件
  • cookie-parser: cookie解析 express中间件
  • compression: gzip压缩 express中间件
  • express-session: session控制 express中间件
  • csurf: 避免csrf安全问题 express中间件
  • cors: 跨域 express中间件
  • morgan: 请求日志记录 express中间件
  • multer: 文件上传 express中间件
  • method-override: 协议头复写 express中间件
  • nodemailer: 支持通过 Node.js 发送邮件
  • node-cron: Node.js 定时任务库
  • nconf: 支持文件、环境变量、命令行参数和原子对象合并的分层 Node.js 配置
  • cross-env: 跨平台环境变量设置