@vuepress/core 2.0.0-rc.17 → 2.0.0-rc.19
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/dist/index.d.ts +1 -10
- package/dist/index.js +28 -27
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -676,15 +676,6 @@ declare const preparePageComponent: (app: App, page: Page) => Promise<void>;
|
|
|
676
676
|
*/
|
|
677
677
|
declare const prepareRoutes: (app: App) => Promise<void>;
|
|
678
678
|
|
|
679
|
-
/**
|
|
680
|
-
* Create base vuepress app.
|
|
681
|
-
*
|
|
682
|
-
* Notice that the base app could not be used for dev nor build.
|
|
683
|
-
*
|
|
684
|
-
* It would be used for creating dev app or build app, or for testing.
|
|
685
|
-
*/
|
|
686
|
-
declare const createBaseApp: (config: AppConfig) => App;
|
|
687
|
-
|
|
688
679
|
/**
|
|
689
680
|
* Create vuepress build app.
|
|
690
681
|
*/
|
|
@@ -705,4 +696,4 @@ declare const resolveAppDir: (options: AppOptions) => AppDir;
|
|
|
705
696
|
*/
|
|
706
697
|
declare const createPage: (app: App, options: PageOptions) => Promise<Page>;
|
|
707
698
|
|
|
708
|
-
export { type AliasDefineHook, type App, type AppConfig, type AppConfigBuild, type AppConfigCommon, type AppConfigDev, type AppDir, type AppDirFunction, type AppEnv, type AppOptions, type AppPropertiesBase, type AppPropertiesInitialized, type AppWriteTemp, type BuildApp, type Bundler, type BundlerOptions, type ClientConfigFileHook, type DevApp, type ExtendsHook, type Hook, type HookItem, type HookQueue, type Hooks, type HooksExposed, type HooksName, type HooksNormalized, type HooksResult, type LifeCycleHook, type Page, type PageOptions, type Plugin, type PluginApi, type PluginConfig, type PluginFunction, type PluginObject, type Theme, type ThemeFunction, type ThemeInfo, type ThemeObject,
|
|
699
|
+
export { type AliasDefineHook, type App, type AppConfig, type AppConfigBuild, type AppConfigCommon, type AppConfigDev, type AppDir, type AppDirFunction, type AppEnv, type AppOptions, type AppPropertiesBase, type AppPropertiesInitialized, type AppWriteTemp, type BuildApp, type Bundler, type BundlerOptions, type ClientConfigFileHook, type DevApp, type ExtendsHook, type Hook, type HookItem, type HookQueue, type Hooks, type HooksExposed, type HooksName, type HooksNormalized, type HooksResult, type LifeCycleHook, type Page, type PageOptions, type Plugin, type PluginApi, type PluginConfig, type PluginFunction, type PluginObject, type Theme, type ThemeFunction, type ThemeInfo, type ThemeObject, createBuildApp, createDevApp, createPage, preparePageChunk, preparePageComponent, prepareRoutes, resolveAppDir };
|
package/dist/index.js
CHANGED
|
@@ -904,6 +904,32 @@ var resolveAppWriteTemp = (dir) => {
|
|
|
904
904
|
return writeTemp;
|
|
905
905
|
};
|
|
906
906
|
|
|
907
|
+
// src/app/createBaseApp.ts
|
|
908
|
+
var createBaseApp = (config) => {
|
|
909
|
+
const options = resolveAppOptions(config);
|
|
910
|
+
const dir = resolveAppDir(options);
|
|
911
|
+
const env = resolveAppEnv(options);
|
|
912
|
+
const pluginApi = createPluginApi();
|
|
913
|
+
const siteData = resolveAppSiteData(options);
|
|
914
|
+
const version = resolveAppVersion();
|
|
915
|
+
const writeTemp = resolveAppWriteTemp(dir);
|
|
916
|
+
const app = {
|
|
917
|
+
options,
|
|
918
|
+
siteData,
|
|
919
|
+
version,
|
|
920
|
+
// utils
|
|
921
|
+
dir,
|
|
922
|
+
env,
|
|
923
|
+
pluginApi,
|
|
924
|
+
writeTemp,
|
|
925
|
+
// methods
|
|
926
|
+
use: (plugin) => appUse(app, plugin),
|
|
927
|
+
init: async () => appInit(app),
|
|
928
|
+
prepare: async () => appPrepare(app)
|
|
929
|
+
};
|
|
930
|
+
return app;
|
|
931
|
+
};
|
|
932
|
+
|
|
907
933
|
// src/app/resolveThemeInfo.ts
|
|
908
934
|
var resolveThemeInfo = (app, theme) => {
|
|
909
935
|
const themeObject = resolvePluginObject(app, theme);
|
|
@@ -934,38 +960,12 @@ var setupAppThemeAndPlugins = (app, config) => {
|
|
|
934
960
|
[...themeInfo.plugins, ...app.options.plugins].flat().forEach((plugin) => app.use(plugin));
|
|
935
961
|
};
|
|
936
962
|
|
|
937
|
-
// src/app/createBaseApp.ts
|
|
938
|
-
var createBaseApp = (config) => {
|
|
939
|
-
const options = resolveAppOptions(config);
|
|
940
|
-
const dir = resolveAppDir(options);
|
|
941
|
-
const env = resolveAppEnv(options);
|
|
942
|
-
const pluginApi = createPluginApi();
|
|
943
|
-
const siteData = resolveAppSiteData(options);
|
|
944
|
-
const version = resolveAppVersion();
|
|
945
|
-
const writeTemp = resolveAppWriteTemp(dir);
|
|
946
|
-
const app = {
|
|
947
|
-
options,
|
|
948
|
-
siteData,
|
|
949
|
-
version,
|
|
950
|
-
// utils
|
|
951
|
-
dir,
|
|
952
|
-
env,
|
|
953
|
-
pluginApi,
|
|
954
|
-
writeTemp,
|
|
955
|
-
// methods
|
|
956
|
-
use: (plugin) => appUse(app, plugin),
|
|
957
|
-
init: async () => appInit(app),
|
|
958
|
-
prepare: async () => appPrepare(app)
|
|
959
|
-
};
|
|
960
|
-
setupAppThemeAndPlugins(app, config);
|
|
961
|
-
return app;
|
|
962
|
-
};
|
|
963
|
-
|
|
964
963
|
// src/app/createBuildApp.ts
|
|
965
964
|
var createBuildApp = (config) => {
|
|
966
965
|
const app = createBaseApp(config);
|
|
967
966
|
app.env.isBuild = true;
|
|
968
967
|
app.build = async () => app.options.bundler.build(app);
|
|
968
|
+
setupAppThemeAndPlugins(app, config);
|
|
969
969
|
return app;
|
|
970
970
|
};
|
|
971
971
|
|
|
@@ -974,6 +974,7 @@ var createDevApp = (config) => {
|
|
|
974
974
|
const app = createBaseApp(config);
|
|
975
975
|
app.env.isDev = true;
|
|
976
976
|
app.dev = async () => app.options.bundler.dev(app);
|
|
977
|
+
setupAppThemeAndPlugins(app, config);
|
|
977
978
|
return app;
|
|
978
979
|
};
|
|
979
980
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.19",
|
|
4
4
|
"description": "Core package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"vue": "^3.5.
|
|
31
|
-
"@vuepress/
|
|
32
|
-
"@vuepress/
|
|
33
|
-
"@vuepress/
|
|
34
|
-
"@vuepress/
|
|
30
|
+
"vue": "^3.5.13",
|
|
31
|
+
"@vuepress/client": "2.0.0-rc.19",
|
|
32
|
+
"@vuepress/markdown": "2.0.0-rc.19",
|
|
33
|
+
"@vuepress/shared": "2.0.0-rc.19",
|
|
34
|
+
"@vuepress/utils": "2.0.0-rc.19"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|