Created
April 15, 2021 12:29
-
-
Save xinyii/8d107221cb526c390c50d4c23049ef0a to your computer and use it in GitHub Desktop.
[Commander] #nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const program = require('commander') | |
const path = require('path') | |
program | |
.requiredOption('-w, --workspace <dir>', '工作目录', (val) => path.resolve(__dirname, val)) | |
.option('-s, --size <size>', '最大并发上传数量', (val, def) => parseInt(val) || def, 10) | |
program.parse(process.argv) | |
const { | |
workspace, | |
size | |
} = program |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment