@vuepress/core 2.0.0-rc.16 → 2.0.0-rc.18
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.js +28 -27
- package/package.json +6 -6
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.18",
|
|
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.11",
|
|
31
|
+
"@vuepress/client": "2.0.0-rc.18",
|
|
32
|
+
"@vuepress/markdown": "2.0.0-rc.18",
|
|
33
|
+
"@vuepress/shared": "2.0.0-rc.18",
|
|
34
|
+
"@vuepress/utils": "2.0.0-rc.18"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|