Scaffold rename

Time:2021-10-25

function

Global command line tool, which can rename files in batches. It supports removing the character with – min in the file name or adding – min to the file

Configure globally available commands

Use the bin attribute of NPM package and declare the executable file to start the command in the entry file
Add the above code to the index.js header of the entry file

#!/usr/bin/env node

Package.json add command name and entry file

"bin": {
    "s_rename": "./index.js"
  },

Publish to NPM

npm publish --access=public