@alauda/doom 0.20.1 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/index.js +3 -2
- package/lib/cli/load-config.d.ts +1 -1
- package/lib/cli/load-config.js +5 -2
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
package/lib/cli/index.js
CHANGED
|
@@ -37,8 +37,9 @@ program
|
|
|
37
37
|
.option('-i, --ignore [boolean]', 'Ignore internal routes', parseBoolean, false)
|
|
38
38
|
.option('-d, --download [boolean]', 'Display download pdf link on nav bar', parseBoolean, false)
|
|
39
39
|
.option('-e, --export [boolean]', 'Run or build in exporting PDF mode, `apis/**` and `*/apis/**` routes will be ignored automatically', parseBoolean, false)
|
|
40
|
-
.option('-I, --include
|
|
41
|
-
.option('-E, --exclude
|
|
40
|
+
.option('-I, --include <language...>', 'Include **only** the specific language(s), `en ru` for example')
|
|
41
|
+
.option('-E, --exclude <language...>', 'Include all languages except the specific language(s), `ru` for example')
|
|
42
|
+
.option('-o, --out-dir <path>', 'Override the `outDir` defined in the config file or the default `dist/{base}/{version}`, the resulting path will be `dist/{outDir}/{version}`')
|
|
42
43
|
.option('-n, --no-open [boolean]', 'Do not open the browser after starting the server')
|
|
43
44
|
.command('dev', { isDefault: true })
|
|
44
45
|
.description('Start the development server')
|
package/lib/cli/load-config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UserConfig } from '@rspress/core';
|
|
2
2
|
import type { GlobalCliOptions } from '../types.js';
|
|
3
|
-
export declare function loadConfig(root?: string, { config: configFile, base, prefix, v: version, download, export: export_, ignore, force, open, lazy, includeLanguage: includeLanguages, excludeLanguage: excludeLanguages, }?: GlobalCliOptions): Promise<{
|
|
3
|
+
export declare function loadConfig(root?: string, { config: configFile, base, prefix, v: version, download, export: export_, ignore, force, open, lazy, includeLanguage: includeLanguages, excludeLanguage: excludeLanguages, outDir, }?: GlobalCliOptions): Promise<{
|
|
4
4
|
config: UserConfig;
|
|
5
5
|
filepath?: string;
|
|
6
6
|
}>;
|
package/lib/cli/load-config.js
CHANGED
|
@@ -172,7 +172,7 @@ const findConfig = async (basePath) => {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
|
-
export async function loadConfig(root, { config: configFile, base, prefix, v: version, download, export: export_, ignore, force, open, lazy, includeLanguage: includeLanguages, excludeLanguage: excludeLanguages, } = {}) {
|
|
175
|
+
export async function loadConfig(root, { config: configFile, base, prefix, v: version, download, export: export_, ignore, force, open, lazy, includeLanguage: includeLanguages, excludeLanguage: excludeLanguages, outDir, } = {}) {
|
|
176
176
|
let configFilePath;
|
|
177
177
|
if (configFile) {
|
|
178
178
|
configFilePath = path.resolve(configFile);
|
|
@@ -271,8 +271,11 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
|
|
|
271
271
|
else {
|
|
272
272
|
mergedConfig.i18nSourcePath = path.resolve(mergedConfig.root, I18N_FILE);
|
|
273
273
|
}
|
|
274
|
+
if (outDir) {
|
|
275
|
+
mergedConfig.outDir = outDir;
|
|
276
|
+
}
|
|
274
277
|
if (mergedConfig.outDir) {
|
|
275
|
-
mergedConfig.outDir = addTrailingSlash(mergedConfig.outDir) + version
|
|
278
|
+
mergedConfig.outDir = `dist${addLeadingSlash(addTrailingSlash(mergedConfig.outDir)) + version}`;
|
|
276
279
|
}
|
|
277
280
|
else {
|
|
278
281
|
mergedConfig.outDir = `dist${isExplicitlyUnversioned(version) ? `${base}${UNVERSIONED}` : base}`;
|
package/lib/types.d.ts
CHANGED