@alauda/doom 0.15.7 → 0.15.8

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 CHANGED
@@ -41,6 +41,7 @@ program
41
41
  .argument('[root]', 'Root directory of the documentation')
42
42
  .option('-H, --host [host]', 'Dev server host name')
43
43
  .option('-P, --port [port]', 'Dev server port number')
44
+ .option('--no-lazy [boolean', 'Do not enable `lazyCompilation`')
44
45
  .action(async function (root) {
45
46
  setNodeEnv('development');
46
47
  let devServer;
@@ -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, ignore, force, open, }?: GlobalCliOptions): Promise<{
3
+ export declare function loadConfig(root?: string, { config: configFile, base, prefix, v: version, download, ignore, force, open, lazy, }?: GlobalCliOptions): Promise<{
4
4
  config: UserConfig;
5
5
  filepath?: string;
6
6
  }>;
@@ -19,7 +19,7 @@ const zhLocaleConfig = {
19
19
  prevPageText: '上一页',
20
20
  nextPageText: '下一页',
21
21
  };
22
- const getCommonConfig = ({ config, root, configFilePath, base, version, download, ignore, force, open, }) => {
22
+ const getCommonConfig = ({ config, root, configFilePath, base, version, download, ignore, force, open, lazy, }) => {
23
23
  const fallbackToZh = 'lang' in config && !config.lang;
24
24
  root = resolveDocRoot(CWD, root, config.root);
25
25
  const localBasePath = configFilePath ? path.dirname(configFilePath) : root;
@@ -114,7 +114,7 @@ const getCommonConfig = ({ config, root, configFilePath, base, version, download
114
114
  ],
115
115
  builderConfig: {
116
116
  dev: {
117
- lazyCompilation: true,
117
+ lazyCompilation: lazy,
118
118
  },
119
119
  plugins: [pluginYaml()],
120
120
  server: {
@@ -135,7 +135,7 @@ const getCommonConfig = ({ config, root, configFilePath, base, version, download
135
135
  const findConfig = (basePath) => {
136
136
  return DEFAULT_EXTENSIONS.map((ext) => basePath + ext).find(fs.existsSync);
137
137
  };
138
- export async function loadConfig(root, { config: configFile, base, prefix, v: version, download, ignore, force, open, } = {}) {
138
+ export async function loadConfig(root, { config: configFile, base, prefix, v: version, download, ignore, force, open, lazy, } = {}) {
139
139
  let configFilePath;
140
140
  if (configFile) {
141
141
  configFilePath = path.resolve(configFile);
@@ -195,6 +195,7 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
195
195
  ignore,
196
196
  force,
197
197
  open,
198
+ lazy,
198
199
  });
199
200
  base = commonConfig.base;
200
201
  const mergedConfig = mergeRsbuildConfig(commonConfig, config, {
package/lib/types.d.ts CHANGED
@@ -12,6 +12,7 @@ export interface GlobalCliOptions {
12
12
  ignore?: boolean;
13
13
  force?: boolean;
14
14
  open?: boolean;
15
+ lazy?: boolean;
15
16
  }
16
17
  export interface TranslateOptions {
17
18
  systemPrompt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.15.7",
3
+ "version": "0.15.8",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {