mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
feat(v2): add --config option to CLI (#4308)
* feat: add --config & --generated-files-dir option to CLI * revert --generated-files-dir option + some refactors Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
9413ba920e
commit
f46adffa17
19 changed files with 225 additions and 169 deletions
27
packages/docusaurus-types/src/index.d.ts
vendored
27
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -131,19 +131,25 @@ export type HostPortCLIOptions = {
|
|||
port?: string;
|
||||
};
|
||||
|
||||
export type StartCLIOptions = HostPortCLIOptions & {
|
||||
hotOnly: boolean;
|
||||
open: boolean;
|
||||
poll: boolean | number;
|
||||
locale?: string;
|
||||
export type ConfigOptions = {
|
||||
config: string;
|
||||
};
|
||||
|
||||
export type ServeCLIOptions = HostPortCLIOptions & {
|
||||
build: boolean;
|
||||
dir: string;
|
||||
};
|
||||
export type StartCLIOptions = HostPortCLIOptions &
|
||||
ConfigOptions & {
|
||||
hotOnly: boolean;
|
||||
open: boolean;
|
||||
poll: boolean | number;
|
||||
locale?: string;
|
||||
};
|
||||
|
||||
export type BuildOptions = {
|
||||
export type ServeCLIOptions = HostPortCLIOptions &
|
||||
ConfigOptions & {
|
||||
dir: string;
|
||||
build: boolean;
|
||||
};
|
||||
|
||||
export type BuildOptions = ConfigOptions & {
|
||||
bundleAnalyzer: boolean;
|
||||
outDir: string;
|
||||
minify: boolean;
|
||||
|
@ -158,6 +164,7 @@ export interface LoadContext {
|
|||
siteDir: string;
|
||||
generatedFilesDir: string;
|
||||
siteConfig: DocusaurusConfig;
|
||||
siteConfigPath: string;
|
||||
outDir: string;
|
||||
baseUrl: string;
|
||||
i18n: I18n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue