0
未定義です: https://github.com/tj/commander.js/ノード司令官のオプションは、私が困っ使用して司令官を抱えている
program
.command('school')
.arguments("<year>")
.option("--month <month>", "specify month")
.parse(process.argv)
.action(function (year) {
console.log(`the year is ${year} and the month is ${program.month}`);
});
私はなぜ知らないが、私は--month 12
で実行してもprogram.month
は未定義です。
ありがとうございます。