This article was inspired by a github project awesome- Nodejs that one of the big guys in the community had been maintaining for several months. If you’re like me, there’s already an awesome nodejs library on Github at 41K ⭐, so what’s the point of maintaining a new one? When you compare, there are differences in nature. One is the finer granularity of the classification system, and the other is the more friendly translation maintenance for Chinese, including the collection of some excellent open source libraries in China. In the end, I think I can make a better review and summary through my own sorting

Through reading the awesome nodejs library, I have extracted some of the more extensive categories of application scenarios and shared the tools with you through the categories of application scenarios involved

1.Git

1.1 Application Scenario 1: Verify ESLint and COMMIT information before Git commit?

You can use the following tools:

  • Husky – Modern native Git hooks make it easier
  • Pre-commit – Automatically installs the Git pre-commit script in your Git repository that runs your NPM test on the pre-commit.
  • Yorkie overwritten Yorkie, yorkie is actually fork husky to make Git hooks simple (used in VUe-CLI 3X)

1.2 Application Scenario 2: How do I Pull a Git Repository from a Node? (Can be used to develop scaffolding)

You can use the following tools:

  • Download – Git-repo – Download and extract git repositories (GitHub, GitLab, Bitbucket)

1.3 Application Scenario 3: How can I View git Flowchart on a Terminal?

You can use the following tools:

  • Gitgraph – Draw git flowchart in Terminal (support browser, React).

1.4 other

  • Git-url-parse – High-level Git parsing
  • Giturl – Converts Git links to Web links.

2. Environmental

2.1 Application Scenario 1: How do I Write environment variables in Different environments?

You can use the following tools:

  • Cross-env – Cross-platform environment script setup, you can set environment variables with a simple command (set environment variables) without worrying about setting or using environment variables platform.
  • Dotenv – Loads environment variables for the Nodejs project from the.env file.
  • Vue-cli –mode – You can override the default mode for the command line by passing the –mode option parameter

3.NPM

3.1 Application Scenario 1: How do I Switch between Different NPM Sources?

You can use the following tools:

  • NRM – Quickly switch to NPM registration service providers, such as NPM, CNPM, NJ, Taobao, etc., and also switch to the internal NPM source
  • PNPM – Compared with YARN, NPM saves a large amount of disk space proportional to projects and dependencies

3.2 Application Scenario 2: How to Read Package. json Information?

You can use the following tools:

  • Read-pkg-up – Reads the latest package.json file.
  • Node-pkginfo – A simple way to read properties from package.json.

3.3 Application Scenario 3: How do I view the updated versions of the package.json dependency

You can use the following tools:

  • Npm-check-updates – Find the updated version of the current package.json dependency that is allowed.

3.4 Application Scenario 4: How To Run Multiple NPM Scripts at the same time

Usually when we run multiple scripts, it might look like this: NPM run build: CSS && NPM run build:js, the Settings will be longer and spliced with &

You can use the following tools:

  • Npm-run-all – Command line tool to run multiple NPM scripts at the same time (parallel or serial)

Npm-run-all provides three commands, namely npm-run-all run-s run-p. The latter two are abbreviations of npm-run-all with parameters, corresponding to serial and parallel commands respectively. It also supports matching delimiters, simplifying script configuration

Or use

  • Concurrently execute commands, similar to but better than NPM run watch-js & NPM run watch-less. (It can only be parallel, though)

3.5 Application Scenario 5: How to Check unused Dependencies of the NPM Module?

You can use the following tools:

  • Depcheck – Checks your NPM module for unused dependencies.

3.6 other:

  • Npminstall – makes NPM install faster and easier, CNPM by default
  • Semver-npm uses a semantic version number parser for JavaScript.

NPM. Devtool. tech is recommended for online query of NPM packages

4. Document generation

4.1 Application Scenario 1: How do I Automatically Generate API Documents?

  • Docsify-api document generator.
  • Jsdoc – API document generator, similar to JavaDoc or PHPDoc.

5. Log tool

5.1 Application Scenario 1: How to Implement Log Classification?

  • Log4js-nodey – a logging library different from Java Log4j.
  • Consola – elegant Node.js and browser logging library.
  • Winston – Multi-transport Asynchronous Logging Library (old)

6. Command line tool

6.1 Application Scenario 1: How to Parse Command Line Input?

The first thing that comes to mind is process.argv, so what other tools can parse it?

You can use the following tools:

  • Minimist – Command line parameter parsing engine
  • Arg – Simple parameter resolution
  • Nopt – Node/ NPM parameter parsing

6.2 Application Scenario 2: How can I Enable Users to Interact with the CLI?

You can use the following tools:

  • Inquirer. Js – A collection of generic interactive command line tools.
  • Prompts – a light, aesthetic, user-friendly interactive command line prompt.
  • Enquirer – User-friendly, intuitive and easy to create stylish CLI tips.

6.3 Application Scenario 3: How do I Display the Progress Bar on the CLI?

You can use the following tools:

  • Progress-node. js flexible ASCII progress bar.
  • Progress-estimator – Records the progress bar and estimates the time required to complete the commitment.

6.4 Application Scenario 4: How do I Multitask on the CLI?

You can use the following tools:

  • Listr – List of command line tasks.

6.5 Application Scenario 5: Icing on the Cake for the CLI?

You can use the following tools:

  • Chalk – Command line string style beautification tool.
  • Ora-elegant command line loading effect.
  • Colors.js – Gets the color of the Node.js console.
  • Qrcode-terminal – the qrcode is displayed in the command line interface.
  • Treeify – Beautifully prints javascript objects as trees.
  • Kleur – The fastest Node.js library that uses ANSI colors to format command line text.

Children interested in children’s shoes can refer to tree jam’s 0-1 development of simple scaffolding, which has a hands-on part of the tool

7. Encryption

Generally, for the sake of project security, we usually encrypt the account password through MD5, AES, SHA1 and SM. What libraries are available in the open source community for us to use?

You can use the following tools:

  • Crypto-js-javascript encryption standard library. Supports the most algorithms
  • Node-rsa-node. js version of Bcrypt.
  • Node-md5 – A JavaScript function that hashes messages using MD5.
  • Aes-js-pure JavaScript implementation of AES.
  • Sm-crypto – sm2, SM3, SM4 JavaScript implementation.
  • Sha.js – Uses streaming SHA hashes in pure JavaScript.

8. Static Website generation & blogs

Build your own blog site quickly based on Node system, you deserve it, can also be used as a component library document display

You can use the following tools:

  • Hexo – Fast, easy, and powerful blogging framework using Node.js.
  • Vuepress – Simple Vue static web site generation tool. (Based on NUXT SSR)
  • Netlify – CMS – Git-based static web site generation tool.
  • Vitepress-vite & vue.js static web site generation tool.

9. Data verification tool

Data validation, the closest to us is the validation of form data. We use an open source validation tool async-Validator in component libraries such as Element and iView.

You can use the following tools:

  • Validator.js – String validation library.
  • Joi – Object schema description language and validator based on JavaScript objects.
  • Async-validator – Asynchronous validator.
  • Ajv – Fastest JSON Schema validator
  • Superstruct – Validates data in JavaScript and TypeScript in a simple and composable way.

10. Parsing tools

10.1 Application Scenario 1: How to Resolve markDown?

You can use the following tools:

  • Marked – Markdown parsers and compilers designed for speed.
  • Remark-markdown processing tool.
  • Markdown -it – An extension & syntax plug-in that supports 100% common Markdown tag parsing.

10.2 Application Scenario 2: How to Parse CSV files?

You can use the following tools:

  • PapaParse – Fast and powerful CSV (delimited text) parser that handles large files and ill-formatted input with grace.
  • Node-csv – A fully functional CSV parser with a simple API and tested against large data sets.
  • Csv-parser – Streaming CSV parser designed to be faster than anyone else.

10.3 Application Scenario 3: How to Parse XML?

You can use the following tools:

  • Xml2js – A converter that converts XML into JavaScript objects.
  • Fast-xml-parser – validates and parses XML.

The last

If you like this library, also give the author Huaize2020 a STAR repository address: awesome-nodejs

I saw a paragraph yesterday and wanted to share it with you

For a daily development test:

  • 1. First thing at the beginning of work, plan the work schedule for the day (it is recommended to have a clear ToDolist and prioritize)
  • 2. Confirm the workload and upstream and downstream associated risks (for example, whether they can be provided on time if they depend on others); If there is any risk, expose early
  • 3. Pay attention to the cost of your time. Not everything is worth all your time
  • 4. Coordinate tasks, clarify boundary responsibilities, avoid ignoring everyone, and timely synchronize tasks to relevant people after completion
  • 5. Summarize experience in time, precipitate technical output to achieve ability reuse, do not start from zero for the same type of task, avoid repeated work

Previous popular articles πŸ“– :

  • Developing visual Data Screens from 0 to 1 (PART 1)
  • Developing visual data Screens from 0 to 1 (part 2)
  • Construction of front-end Knowledge System of Tree Jam (PART 1)
  • Construction of front-end Knowledge System of Tree Jam (Part 2)
  • Talk about daily collaboration tools for front-end development
  • Babel configuration is stupid
  • How to better manage the Api
  • The interviewer asks you about Node
  • Front-end engineering stuff
  • Did you learn BFF and Serverless
  • Front-end operations and deployment

Hello, I am 🌲 tree sauce, please drink a cup 🍡 remember three lian oh ~

1. Remember to click a thumbs-up after reading oh, there is πŸ‘ motivation

2. Pay attention to the interesting things at the front of the public account, and chat with you about the interesting things at the front

3. Github frontendThings thanks to Star✨