fix(v2): add serve to internal command list (#3451)

Right now `docusaurus serve my-dir` doesn't work because it's not registered as an internal command, thus always forced to invoked w/ `path.resolve('.')`. This fixes that
This commit is contained in:
Long Ho 2020-09-23 14:15:40 -04:00 committed by GitHub
parent 02f96286e5
commit 407581d26a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,7 @@ cli.arguments('<command>').action((cmd) => {
});
function isInternalCommand(command) {
return ['start', 'build', 'swizzle', 'deploy'].includes(command);
return ['start', 'build', 'swizzle', 'deploy', 'serve'].includes(command);
}
if (!isInternalCommand(process.argv.slice(2)[0])) {