mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Show help if no command is provided or if command is not found
This commit is contained in:
parent
1c15eba932
commit
01f37eb3fe
@ -70,8 +70,12 @@ program.command('build')
|
||||
buildTailwind(inputFile, loadConfig(program.config), writeStrategy(program))
|
||||
})
|
||||
|
||||
program.parse(process.argv)
|
||||
const subCmd = _.head(program.args);
|
||||
const cmds = _.map(program.commands, '_name');
|
||||
|
||||
if (! process.argv.slice(2).length) {
|
||||
if (!_.includes(cmds, subCmd)) {
|
||||
program.help();
|
||||
process.exit()
|
||||
}
|
||||
|
||||
program.parse(process.argv)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user