@vuepress/core 2.0.0-beta.8 → 2.0.0-rc.0
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 +845 -0
- package/dist/index.js +1039 -0
- package/package.json +34 -17
- package/CHANGELOG.md +0 -311
- package/lib/app/appInit.d.ts +0 -7
- package/lib/app/appInit.js +0 -26
- package/lib/app/appPrepare.d.ts +0 -10
- package/lib/app/appPrepare.js +0 -46
- package/lib/app/appUse.d.ts +0 -2
- package/lib/app/appUse.js +0 -28
- package/lib/app/appUseByConfig.d.ts +0 -2
- package/lib/app/appUseByConfig.js +0 -14
- package/lib/app/createApp.d.ts +0 -5
- package/lib/app/createApp.js +0 -55
- package/lib/app/createAppDir.d.ts +0 -9
- package/lib/app/createAppDir.js +0 -32
- package/lib/app/createAppEnv.d.ts +0 -5
- package/lib/app/createAppEnv.js +0 -14
- package/lib/app/createAppOptions.d.ts +0 -5
- package/lib/app/createAppOptions.js +0 -48
- package/lib/app/createAppPages.d.ts +0 -5
- package/lib/app/createAppPages.js +0 -36
- package/lib/app/createAppSiteData.d.ts +0 -7
- package/lib/app/createAppSiteData.js +0 -19
- package/lib/app/createAppVersion.d.ts +0 -4
- package/lib/app/createAppVersion.js +0 -11
- package/lib/app/createAppWriteTemp.d.ts +0 -5
- package/lib/app/createAppWriteTemp.js +0 -21
- package/lib/app/index.d.ts +0 -16
- package/lib/app/index.js +0 -28
- package/lib/app/normalizePlugin.d.ts +0 -2
- package/lib/app/normalizePlugin.js +0 -17
- package/lib/app/normalizePluginConfig.d.ts +0 -2
- package/lib/app/normalizePluginConfig.js +0 -18
- package/lib/app/prepare/index.d.ts +0 -12
- package/lib/app/prepare/index.js +0 -24
- package/lib/app/prepare/prepareClientAppEnhances.d.ts +0 -5
- package/lib/app/prepare/prepareClientAppEnhances.js +0 -24
- package/lib/app/prepare/prepareClientAppRootComponents.d.ts +0 -5
- package/lib/app/prepare/prepareClientAppRootComponents.js +0 -24
- package/lib/app/prepare/prepareClientAppSetups.d.ts +0 -5
- package/lib/app/prepare/prepareClientAppSetups.js +0 -24
- package/lib/app/prepare/prepareLayoutComponents.d.ts +0 -5
- package/lib/app/prepare/prepareLayoutComponents.js +0 -20
- package/lib/app/prepare/preparePageComponent.d.ts +0 -5
- package/lib/app/prepare/preparePageComponent.js +0 -10
- package/lib/app/prepare/preparePageData.d.ts +0 -5
- package/lib/app/prepare/preparePageData.js +0 -37
- package/lib/app/prepare/preparePageRoutes.d.ts +0 -5
- package/lib/app/prepare/preparePageRoutes.js +0 -57
- package/lib/app/prepare/preparePagesComponent.d.ts +0 -5
- package/lib/app/prepare/preparePagesComponent.js +0 -23
- package/lib/app/prepare/preparePagesData.d.ts +0 -5
- package/lib/app/prepare/preparePagesData.js +0 -19
- package/lib/app/prepare/preparePagesRoutes.d.ts +0 -5
- package/lib/app/prepare/preparePagesRoutes.js +0 -25
- package/lib/app/prepare/prepareSiteData.d.ts +0 -5
- package/lib/app/prepare/prepareSiteData.js +0 -31
- package/lib/app/prepare/resolvePageData.d.ts +0 -5
- package/lib/app/prepare/resolvePageData.js +0 -18
- package/lib/app/resolveBundler.d.ts +0 -2
- package/lib/app/resolveBundler.js +0 -10
- package/lib/app/resolvePlugin.d.ts +0 -5
- package/lib/app/resolvePlugin.js +0 -20
- package/lib/index.d.ts +0 -5
- package/lib/index.js +0 -17
- package/lib/page/createPage.d.ts +0 -2
- package/lib/page/createPage.js +0 -98
- package/lib/page/index.d.ts +0 -17
- package/lib/page/index.js +0 -29
- package/lib/page/inferPagePath.d.ts +0 -11
- package/lib/page/inferPagePath.js +0 -27
- package/lib/page/resolvePageComponentInfo.d.ts +0 -20
- package/lib/page/resolvePageComponentInfo.js +0 -41
- package/lib/page/resolvePageContent.d.ts +0 -11
- package/lib/page/resolvePageContent.js +0 -31
- package/lib/page/resolvePageDataInfo.d.ts +0 -12
- package/lib/page/resolvePageDataInfo.js +0 -18
- package/lib/page/resolvePageDate.d.ts +0 -10
- package/lib/page/resolvePageDate.js +0 -46
- package/lib/page/resolvePageExcerpt.d.ts +0 -9
- package/lib/page/resolvePageExcerpt.js +0 -15
- package/lib/page/resolvePageFileContent.d.ts +0 -8
- package/lib/page/resolvePageFileContent.js +0 -24
- package/lib/page/resolvePageFilePath.d.ts +0 -11
- package/lib/page/resolvePageFilePath.js +0 -29
- package/lib/page/resolvePageFrontmatter.d.ts +0 -8
- package/lib/page/resolvePageFrontmatter.js +0 -12
- package/lib/page/resolvePageKey.d.ts +0 -6
- package/lib/page/resolvePageKey.js +0 -9
- package/lib/page/resolvePageLang.d.ts +0 -9
- package/lib/page/resolvePageLang.js +0 -15
- package/lib/page/resolvePagePath.d.ts +0 -9
- package/lib/page/resolvePagePath.js +0 -8
- package/lib/page/resolvePagePermalink.d.ts +0 -11
- package/lib/page/resolvePagePermalink.js +0 -32
- package/lib/page/resolvePageRoutesInfo.d.ts +0 -11
- package/lib/page/resolvePageRoutesInfo.js +0 -16
- package/lib/page/resolvePageSlug.d.ts +0 -6
- package/lib/page/resolvePageSlug.js +0 -17
- package/lib/page/resolvePageTitle.d.ts +0 -9
- package/lib/page/resolvePageTitle.js +0 -26
- package/lib/pluginApi/createHookQueue.d.ts +0 -5
- package/lib/pluginApi/createHookQueue.js +0 -81
- package/lib/pluginApi/createPluginApi.d.ts +0 -2
- package/lib/pluginApi/createPluginApi.js +0 -16
- package/lib/pluginApi/createPluginApiHooks.d.ts +0 -2
- package/lib/pluginApi/createPluginApiHooks.js +0 -24
- package/lib/pluginApi/createPluginApiRegisterHooks.d.ts +0 -2
- package/lib/pluginApi/createPluginApiRegisterHooks.js +0 -54
- package/lib/pluginApi/index.d.ts +0 -6
- package/lib/pluginApi/index.js +0 -18
- package/lib/pluginApi/normalizeClientFilesHook.d.ts +0 -5
- package/lib/pluginApi/normalizeClientFilesHook.js +0 -28
- package/lib/pluginApi/normalizeReturnObjectHook.d.ts +0 -5
- package/lib/pluginApi/normalizeReturnObjectHook.js +0 -9
- package/lib/themeApi/createThemeApi.d.ts +0 -7
- package/lib/themeApi/createThemeApi.js +0 -30
- package/lib/themeApi/index.d.ts +0 -1
- package/lib/themeApi/index.js +0 -13
- package/lib/themeApi/resolveThemeInfo.d.ts +0 -2
- package/lib/themeApi/resolveThemeInfo.js +0 -32
- package/lib/themeApi/resolveThemeLayouts.d.ts +0 -5
- package/lib/themeApi/resolveThemeLayouts.js +0 -32
- package/lib/types/app/app.d.ts +0 -30
- package/lib/types/app/app.js +0 -2
- package/lib/types/app/index.d.ts +0 -3
- package/lib/types/app/index.js +0 -15
- package/lib/types/app/options.d.ts +0 -32
- package/lib/types/app/options.js +0 -2
- package/lib/types/app/utils.d.ts +0 -29
- package/lib/types/app/utils.js +0 -2
- package/lib/types/bundler.d.ts +0 -34
- package/lib/types/bundler.js +0 -2
- package/lib/types/index.d.ts +0 -9
- package/lib/types/index.js +0 -19
- package/lib/types/page.d.ts +0 -98
- package/lib/types/page.js +0 -2
- package/lib/types/plugin-api/hooks.d.ts +0 -75
- package/lib/types/plugin-api/hooks.js +0 -2
- package/lib/types/plugin-api/index.d.ts +0 -2
- package/lib/types/plugin-api/index.js +0 -14
- package/lib/types/plugin-api/pluginApi.d.ts +0 -23
- package/lib/types/plugin-api/pluginApi.js +0 -2
- package/lib/types/plugin.d.ts +0 -48
- package/lib/types/plugin.js +0 -2
- package/lib/types/theme-api/index.d.ts +0 -1
- package/lib/types/theme-api/index.js +0 -13
- package/lib/types/theme-api/themeApi.d.ts +0 -44
- package/lib/types/theme-api/themeApi.js +0 -2
- package/lib/types/theme.d.ts +0 -33
- package/lib/types/theme.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/core",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.0",
|
|
4
4
|
"description": "Core package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -15,26 +15,43 @@
|
|
|
15
15
|
"url": "git+https://github.com/vuepress/vuepress-next.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"author": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
18
|
+
"author": "meteorlxy",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./dist/index.js",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
21
26
|
"files": [
|
|
22
|
-
"
|
|
27
|
+
"dist"
|
|
23
28
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc -b tsconfig.build.json",
|
|
26
|
-
"clean": "rimraf lib *.tsbuildinfo"
|
|
27
|
-
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
-
"@vuepress/
|
|
31
|
-
"@vuepress/shared": "2.0.0-
|
|
32
|
-
"@vuepress/
|
|
33
|
-
"
|
|
34
|
-
"toml": "^3.0.0"
|
|
30
|
+
"vue": "^3.3.8",
|
|
31
|
+
"@vuepress/client": "2.0.0-rc.0",
|
|
32
|
+
"@vuepress/shared": "2.0.0-rc.0",
|
|
33
|
+
"@vuepress/markdown": "2.0.0-rc.0",
|
|
34
|
+
"@vuepress/utils": "2.0.0-rc.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
39
|
+
"tsup": {
|
|
40
|
+
"clean": true,
|
|
41
|
+
"dts": "./src/index.ts",
|
|
42
|
+
"entry": [
|
|
43
|
+
"./src/index.ts"
|
|
44
|
+
],
|
|
45
|
+
"format": [
|
|
46
|
+
"esm"
|
|
47
|
+
],
|
|
48
|
+
"outDir": "./dist",
|
|
49
|
+
"sourcemap": false,
|
|
50
|
+
"target": "es2022",
|
|
51
|
+
"tsconfig": "../tsconfig.dts.json"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsup",
|
|
55
|
+
"clean": "rimraf dist"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [2.0.0-beta.8](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2021-04-11)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Code Refactoring
|
|
10
|
-
|
|
11
|
-
* **core:** resolve theme when creating app ([fa683cb](https://github.com/vuepress/vuepress-next/commit/fa683cb76e8a3bcacc08d1dfd8bea6af79fee1d2))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Features
|
|
15
|
-
|
|
16
|
-
* **utils:** add logger.createError method ([0c198d7](https://github.com/vuepress/vuepress-next/commit/0c198d7f9e122828b37a2db670048cfc2ce20e81))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### BREAKING CHANGES
|
|
20
|
-
|
|
21
|
-
* **core:** theme plugins could be overridden by user plugins now
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# [2.0.0-beta.7](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2021-04-09)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Features
|
|
31
|
-
|
|
32
|
-
* **core:** show warning when duplicate plugins are detected ([742f581](https://github.com/vuepress/vuepress-next/commit/742f5811032b3a2f0687edf3f966d25517734a8d))
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# [2.0.0-beta.6](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.5...v2.0.0-beta.6) (2021-03-26)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @vuepress/core
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# [2.0.0-beta.5](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2021-03-26)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Performance Improvements
|
|
50
|
-
|
|
51
|
-
* improve HMR support ([38f0073](https://github.com/vuepress/vuepress-next/commit/38f007335864db4c9125ea5905ca91850fb7103b))
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
# [2.0.0-beta.4](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2021-03-20)
|
|
58
|
-
|
|
59
|
-
**Note:** Version bump only for package @vuepress/core
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
# [2.0.0-beta.1](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2021-03-13)
|
|
66
|
-
|
|
67
|
-
**Note:** Version bump only for package @vuepress/core
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# [2.0.0-beta.0](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.26...v2.0.0-beta.0) (2021-03-13)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Features
|
|
77
|
-
|
|
78
|
-
* implement vite hmr ([525c18d](https://github.com/vuepress/vuepress-next/commit/525c18d5a64fbdbdeb5ce1348ec1e1ead3dbd8f9))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
# [2.0.0-alpha.25](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2021-02-20)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Code Refactoring
|
|
88
|
-
|
|
89
|
-
* **core:** remove theme data from site data ([187aef3](https://github.com/vuepress/vuepress-next/commit/187aef36607efc62d7b2d5c773553f89685cf64c))
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### BREAKING CHANGES
|
|
93
|
-
|
|
94
|
-
* **core:** `themeConfig` is not available in site data any more
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# [2.0.0-alpha.24](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2021-02-13)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### Code Refactoring
|
|
104
|
-
|
|
105
|
-
* **core:** change page default date to 0000-00-00 ([1ce602e](https://github.com/vuepress/vuepress-next/commit/1ce602ef811f29f083a8d10695a7b212ed82cae5))
|
|
106
|
-
* **core:** remove permalink and pattern from page options ([9534989](https://github.com/vuepress/vuepress-next/commit/9534989a82e620b1c09b4a09d4cfee1e99d145fc))
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
### Features
|
|
110
|
-
|
|
111
|
-
* **core:** add extendsPageOptions hook ([19b7e83](https://github.com/vuepress/vuepress-next/commit/19b7e83cb25ec523857d34c415782d595a05d0ff))
|
|
112
|
-
* **core:** add watchers parameter to onWatched hook ([0bcd594](https://github.com/vuepress/vuepress-next/commit/0bcd594d1645fe9994d1456e86803e5619057bfb))
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### BREAKING CHANGES
|
|
116
|
-
|
|
117
|
-
* **core:** remove permalink and pattern from page options
|
|
118
|
-
* **core:** change page default date from 1970-01-01 to 0000-00-00
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
# [2.0.0-alpha.23](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2021-02-10)
|
|
125
|
-
|
|
126
|
-
**Note:** Version bump only for package @vuepress/core
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
# [2.0.0-alpha.22](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2021-02-10)
|
|
133
|
-
|
|
134
|
-
**Note:** Version bump only for package @vuepress/core
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
# [2.0.0-alpha.20](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2021-02-04)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Features
|
|
144
|
-
|
|
145
|
-
* **core:** create siteData in vuepress app ([05b87dd](https://github.com/vuepress/vuepress-next/commit/05b87ddf32f32c94cc131e0074365aeba70f85f2))
|
|
146
|
-
* **core:** make language available in page data ([03bb09f](https://github.com/vuepress/vuepress-next/commit/03bb09fd51aeaff56d26820a1401b87ea8bdeb38))
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
# [2.0.0-alpha.19](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2021-01-24)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
### Features
|
|
156
|
-
|
|
157
|
-
* **core:** add onWatched hook ([9725a10](https://github.com/vuepress/vuepress-next/commit/9725a101599363094a85916317109b67d365dff4))
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
# [2.0.0-alpha.18](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2021-01-17)
|
|
164
|
-
|
|
165
|
-
**Note:** Version bump only for package @vuepress/core
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
# [2.0.0-alpha.17](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2021-01-13)
|
|
172
|
-
|
|
173
|
-
**Note:** Version bump only for package @vuepress/core
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
# [2.0.0-alpha.16](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2021-01-11)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
### Bug Fixes
|
|
183
|
-
|
|
184
|
-
* **core:** support special characters in filename and permalink ([c3e68ef](https://github.com/vuepress/vuepress-next/commit/c3e68ef6a4aa3f6722d5bc4079bafe5d3b176e5e))
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
# [2.0.0-alpha.15](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2021-01-04)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
### Features
|
|
194
|
-
|
|
195
|
-
* **core:** provide app in all plugin hooks ([21cc3a6](https://github.com/vuepress/vuepress-next/commit/21cc3a608e54d38de8de8f453b5e88031b4cedb1))
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
# [2.0.0-alpha.14](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2021-01-03)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### Bug Fixes
|
|
205
|
-
|
|
206
|
-
* **core:** fix page date resolving ([de6c5c8](https://github.com/vuepress/vuepress-next/commit/de6c5c8ca89347bea4ba2925e283a7b710a5b5d3))
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
# [2.0.0-alpha.13](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2020-12-23)
|
|
213
|
-
|
|
214
|
-
**Note:** Version bump only for package @vuepress/core
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
# [2.0.0-alpha.12](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2020-12-19)
|
|
221
|
-
|
|
222
|
-
**Note:** Version bump only for package @vuepress/core
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
# [2.0.0-alpha.8](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2020-12-11)
|
|
229
|
-
|
|
230
|
-
**Note:** Version bump only for package @vuepress/core
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
# [2.0.0-alpha.7](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2020-12-09)
|
|
237
|
-
|
|
238
|
-
**Note:** Version bump only for package @vuepress/core
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
# [2.0.0-alpha.6](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2020-12-09)
|
|
245
|
-
|
|
246
|
-
**Note:** Version bump only for package @vuepress/core
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
# [2.0.0-alpha.5](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2020-12-03)
|
|
253
|
-
|
|
254
|
-
**Note:** Version bump only for package @vuepress/core
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
# [2.0.0-alpha.4](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2020-12-02)
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
### Bug Fixes
|
|
264
|
-
|
|
265
|
-
* **core:** failed to resolve local theme ([4d836e2](https://github.com/vuepress/vuepress-next/commit/4d836e2bc3e7affe17f63df1c4ce40c464a7e6fb))
|
|
266
|
-
* **core:** warn if layout directory does not exist ([3d2d414](https://github.com/vuepress/vuepress-next/commit/3d2d4148024963521b9e1ebbc29aa19697ac3452))
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
# [2.0.0-alpha.3](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2020-12-01)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
### Bug Fixes
|
|
276
|
-
|
|
277
|
-
* **core:** avoid runtime warning for empty template (close [#10](https://github.com/vuepress/vuepress-next/issues/10)) ([bcbf703](https://github.com/vuepress/vuepress-next/commit/bcbf703e6e449f7753697b7dfc503bd643bfd240))
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
# 2.0.0-alpha.1 (2020-12-01)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
### Bug Fixes
|
|
287
|
-
|
|
288
|
-
* **core:** default value of base and lang ([5a5df27](https://github.com/vuepress/vuepress-next/commit/5a5df274de4691315e567e932a6cffe4a04d88c1))
|
|
289
|
-
* **core:** infer page locale path correctly ([8f2b10b](https://github.com/vuepress/vuepress-next/commit/8f2b10bc8c9fa58ee4181bbfc50ade3e45e382ff))
|
|
290
|
-
* **core:** resolve page date ([bd627d7](https://github.com/vuepress/vuepress-next/commit/bd627d79482e77c573654db699ff58f93e8d8dd5))
|
|
291
|
-
* **core:** resolve page excerpt with correct markdown env ([e0f4066](https://github.com/vuepress/vuepress-next/commit/e0f406625baf085ced29ea88328069fb0a1d0cf4))
|
|
292
|
-
* **core:** resolve page title from markdown content as fallback ([b216012](https://github.com/vuepress/vuepress-next/commit/b2160129b175013518b9fb7d82d034694509ae86))
|
|
293
|
-
* **core:** resolve plugin and theme by name ([3031324](https://github.com/vuepress/vuepress-next/commit/30313247958f9e1d4a7214a18ce6e17bc582bc3e))
|
|
294
|
-
* **core:** respect page options ([d8dbbb7](https://github.com/vuepress/vuepress-next/commit/d8dbbb777161130634fe5cadf0be571ed830a7ab))
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
### Features
|
|
298
|
-
|
|
299
|
-
* **core:** add 404 page if not exist ([0297a9e](https://github.com/vuepress/vuepress-next/commit/0297a9ed96acb0b792dac44f72f4d549a5930841))
|
|
300
|
-
* **core:** add clientAppRootComponentFiles hook ([7f640c8](https://github.com/vuepress/vuepress-next/commit/7f640c879f53b5dff67a2c6d374360f3e19aa679))
|
|
301
|
-
* **core:** add extendsPageData hook ([5a10994](https://github.com/vuepress/vuepress-next/commit/5a109943ed1beb3ddfd07c018e0cba33cb46fdb2))
|
|
302
|
-
* **core:** add pagePatterns option ([9a8855d](https://github.com/vuepress/vuepress-next/commit/9a8855d86683e95e2dae33493d0321fa14bfee9d))
|
|
303
|
-
* **core:** add public directory config ([1b52ffe](https://github.com/vuepress/vuepress-next/commit/1b52ffe89a7f87d3c6822d07b6b75f2675b8745f))
|
|
304
|
-
* **core:** add theme layouts option ([bf96cc3](https://github.com/vuepress/vuepress-next/commit/bf96cc3a2ab9133d3606231e3f9d0c46b2a2103c))
|
|
305
|
-
* **core:** allow disable prefetch and preload links ([2991b6a](https://github.com/vuepress/vuepress-next/commit/2991b6a7025eefac21846eb520aa5ca2ea2dc594))
|
|
306
|
-
* **core:** allow plugins and themes use export default ([874979d](https://github.com/vuepress/vuepress-next/commit/874979d6d86e308469488c8405e6f7bbc80d1391))
|
|
307
|
-
* **core:** enable evergreen option by default ([fa67dbb](https://github.com/vuepress/vuepress-next/commit/fa67dbb9474c27ff10e4061ac15171bc4936d274))
|
|
308
|
-
* **core:** export LocaleConfig type from shared ([04de925](https://github.com/vuepress/vuepress-next/commit/04de925326ad1101702e57fd9903de808a72bb97))
|
|
309
|
-
* **core:** inject page title into route meta ([0d9e7e3](https://github.com/vuepress/vuepress-next/commit/0d9e7e3b3a0a78504fc586887cf1a777ae434846))
|
|
310
|
-
* **core:** remove plugins from app options ([fe411e7](https://github.com/vuepress/vuepress-next/commit/fe411e7ef8a5802876f55246a9937825e802f538))
|
|
311
|
-
* **core:** remove webpack related hooks ([9613f69](https://github.com/vuepress/vuepress-next/commit/9613f69ace1413b3776a6012319cf7c6fe1d3469))
|
package/lib/app/appInit.d.ts
DELETED
package/lib/app/appInit.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appInit = void 0;
|
|
4
|
-
const utils_1 = require("@vuepress/utils");
|
|
5
|
-
const createAppPages_1 = require("./createAppPages");
|
|
6
|
-
const log = utils_1.debug('vuepress:core/app');
|
|
7
|
-
/**
|
|
8
|
-
* Initialize a vuepress app
|
|
9
|
-
*
|
|
10
|
-
* Plugins should be used before initialization.
|
|
11
|
-
*/
|
|
12
|
-
const appInit = async (app) => {
|
|
13
|
-
log('init start');
|
|
14
|
-
// register all hooks of plugins that have been used
|
|
15
|
-
// plugins should be used before `registerHooks()`
|
|
16
|
-
// hooks in plugins will take effect after `registerHooks()`
|
|
17
|
-
app.pluginApi.registerHooks();
|
|
18
|
-
// plugin hook: extendsMarkdown
|
|
19
|
-
await app.pluginApi.hooks.extendsMarkdown.process(app.markdown, app);
|
|
20
|
-
// create pages
|
|
21
|
-
app.pages = await createAppPages_1.createAppPages(app);
|
|
22
|
-
// plugin hook: onInitialized
|
|
23
|
-
await app.pluginApi.hooks.onInitialized.process(app);
|
|
24
|
-
log('init finish');
|
|
25
|
-
};
|
|
26
|
-
exports.appInit = appInit;
|
package/lib/app/appPrepare.d.ts
DELETED
package/lib/app/appPrepare.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appPrepare = void 0;
|
|
4
|
-
const utils_1 = require("@vuepress/utils");
|
|
5
|
-
const prepare_1 = require("./prepare");
|
|
6
|
-
const log = utils_1.debug('vuepress:core/app');
|
|
7
|
-
/**
|
|
8
|
-
* Prepare files for development or build
|
|
9
|
-
*
|
|
10
|
-
* - page components
|
|
11
|
-
* - routes
|
|
12
|
-
* - site data
|
|
13
|
-
* - other files that generated by plugins
|
|
14
|
-
*/
|
|
15
|
-
const appPrepare = async (app) => {
|
|
16
|
-
log('prepare start');
|
|
17
|
-
// generate page component files
|
|
18
|
-
for (const page of app.pages) {
|
|
19
|
-
await prepare_1.preparePageComponent(app, page);
|
|
20
|
-
}
|
|
21
|
-
await prepare_1.preparePagesComponent(app);
|
|
22
|
-
// generate page data files
|
|
23
|
-
for (const page of app.pages) {
|
|
24
|
-
await prepare_1.preparePageData(app, page);
|
|
25
|
-
}
|
|
26
|
-
await prepare_1.preparePagesData(app);
|
|
27
|
-
// generate layout components map file
|
|
28
|
-
await prepare_1.prepareLayoutComponents(app);
|
|
29
|
-
// generate routes file
|
|
30
|
-
for (const page of app.pages) {
|
|
31
|
-
await prepare_1.preparePageRoutes(app, page);
|
|
32
|
-
}
|
|
33
|
-
await prepare_1.preparePagesRoutes(app);
|
|
34
|
-
// generate site data file
|
|
35
|
-
await prepare_1.prepareSiteData(app);
|
|
36
|
-
// generate client app enhances file
|
|
37
|
-
await prepare_1.prepareClientAppEnhances(app);
|
|
38
|
-
// generate client app root components file
|
|
39
|
-
await prepare_1.prepareClientAppRootComponents(app);
|
|
40
|
-
// generate client app setups file
|
|
41
|
-
await prepare_1.prepareClientAppSetups(app);
|
|
42
|
-
// plugin hook: onPrepared
|
|
43
|
-
await app.pluginApi.hooks.onPrepared.process(app);
|
|
44
|
-
log('prepare finish');
|
|
45
|
-
};
|
|
46
|
-
exports.appPrepare = appPrepare;
|
package/lib/app/appUse.d.ts
DELETED
package/lib/app/appUse.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appUse = void 0;
|
|
4
|
-
const utils_1 = require("@vuepress/utils");
|
|
5
|
-
const normalizePlugin_1 = require("./normalizePlugin");
|
|
6
|
-
const log = utils_1.debug('vuepress:core/app');
|
|
7
|
-
const appUse = (app, rawPlugin, config) => {
|
|
8
|
-
// normalize plugin
|
|
9
|
-
const plugin = normalizePlugin_1.normalizePlugin(app, rawPlugin, config);
|
|
10
|
-
log(`use plugin ${utils_1.chalk.magenta(plugin.name)}`);
|
|
11
|
-
if (plugin.multiple !== true) {
|
|
12
|
-
// remove duplicated plugin
|
|
13
|
-
const duplicateIndex = app.pluginApi.plugins.findIndex(({ name }) => name === plugin.name);
|
|
14
|
-
if (duplicateIndex !== -1) {
|
|
15
|
-
app.pluginApi.plugins.splice(duplicateIndex, 1);
|
|
16
|
-
// show warning when duplicate plugins are detected
|
|
17
|
-
utils_1.warn(`plugin ${utils_1.chalk.magenta(plugin.name)} has been used multiple times, only the last one will take effect`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
// use plugin
|
|
21
|
-
app.pluginApi.plugins.push(plugin);
|
|
22
|
-
// TODO: nested plugins with `multiple` may cause potential problems
|
|
23
|
-
// if the plugin uses other plugins
|
|
24
|
-
if (plugin.plugins) {
|
|
25
|
-
plugin.plugins.forEach(app.useByConfig);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.appUse = appUse;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appUseByConfig = void 0;
|
|
4
|
-
const normalizePluginConfig_1 = require("./normalizePluginConfig");
|
|
5
|
-
const appUseByConfig = (app, pluginConfig) => {
|
|
6
|
-
const normalizedPluginConfig = normalizePluginConfig_1.normalizePluginConfig(pluginConfig);
|
|
7
|
-
if (normalizedPluginConfig === false)
|
|
8
|
-
return;
|
|
9
|
-
const [plugin, config] = normalizedPluginConfig;
|
|
10
|
-
if (config === false)
|
|
11
|
-
return;
|
|
12
|
-
return app.use(plugin, config === true ? {} : config);
|
|
13
|
-
};
|
|
14
|
-
exports.appUseByConfig = appUseByConfig;
|
package/lib/app/createApp.d.ts
DELETED
package/lib/app/createApp.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createApp = void 0;
|
|
4
|
-
const markdown_1 = require("@vuepress/markdown");
|
|
5
|
-
const pluginApi_1 = require("../pluginApi");
|
|
6
|
-
const themeApi_1 = require("../themeApi");
|
|
7
|
-
const appInit_1 = require("./appInit");
|
|
8
|
-
const appPrepare_1 = require("./appPrepare");
|
|
9
|
-
const appUse_1 = require("./appUse");
|
|
10
|
-
const appUseByConfig_1 = require("./appUseByConfig");
|
|
11
|
-
const createAppDir_1 = require("./createAppDir");
|
|
12
|
-
const createAppEnv_1 = require("./createAppEnv");
|
|
13
|
-
const createAppOptions_1 = require("./createAppOptions");
|
|
14
|
-
const createAppSiteData_1 = require("./createAppSiteData");
|
|
15
|
-
const createAppVersion_1 = require("./createAppVersion");
|
|
16
|
-
const createAppWriteTemp_1 = require("./createAppWriteTemp");
|
|
17
|
-
const resolveBundler_1 = require("./resolveBundler");
|
|
18
|
-
/**
|
|
19
|
-
* Create vuepress app
|
|
20
|
-
*/
|
|
21
|
-
const createApp = (config) => {
|
|
22
|
-
const version = createAppVersion_1.createAppVersion();
|
|
23
|
-
const options = createAppOptions_1.createAppOptions(config);
|
|
24
|
-
const dir = createAppDir_1.createAppDir(options);
|
|
25
|
-
const env = createAppEnv_1.createAppEnv(options);
|
|
26
|
-
const siteData = createAppSiteData_1.createAppSiteData(options);
|
|
27
|
-
const markdown = markdown_1.createMarkdown(options.markdown);
|
|
28
|
-
const pluginApi = pluginApi_1.createPluginApi();
|
|
29
|
-
const writeTemp = createAppWriteTemp_1.createAppWriteTemp(dir);
|
|
30
|
-
const app = {
|
|
31
|
-
version,
|
|
32
|
-
options,
|
|
33
|
-
dir,
|
|
34
|
-
env,
|
|
35
|
-
siteData,
|
|
36
|
-
markdown,
|
|
37
|
-
pluginApi,
|
|
38
|
-
writeTemp,
|
|
39
|
-
use: (...args) => appUse_1.appUse(app, ...args),
|
|
40
|
-
useByConfig: (...args) => appUseByConfig_1.appUseByConfig(app, ...args),
|
|
41
|
-
init: () => appInit_1.appInit(app),
|
|
42
|
-
prepare: () => appPrepare_1.appPrepare(app),
|
|
43
|
-
dev: () => resolveBundler_1.resolveBundler(options).dev(app),
|
|
44
|
-
build: () => resolveBundler_1.resolveBundler(options).build(app),
|
|
45
|
-
};
|
|
46
|
-
// create theme api, resolve themes and layouts
|
|
47
|
-
app.themeApi = themeApi_1.createThemeApi(app);
|
|
48
|
-
// use theme plugin
|
|
49
|
-
if (app.themeApi.parentTheme) {
|
|
50
|
-
app.use(app.themeApi.parentTheme.plugin);
|
|
51
|
-
}
|
|
52
|
-
app.use(app.themeApi.theme.plugin);
|
|
53
|
-
return app;
|
|
54
|
-
};
|
|
55
|
-
exports.createApp = createApp;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AppDir, AppDirFunction, AppOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Create directory util function
|
|
4
|
-
*/
|
|
5
|
-
export declare const createAppDirFunction: (baseDir: string) => AppDirFunction;
|
|
6
|
-
/**
|
|
7
|
-
* Create directory utils for vuepress app
|
|
8
|
-
*/
|
|
9
|
-
export declare const createAppDir: (options: AppOptions) => AppDir;
|
package/lib/app/createAppDir.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAppDir = exports.createAppDirFunction = void 0;
|
|
4
|
-
const utils_1 = require("@vuepress/utils");
|
|
5
|
-
/**
|
|
6
|
-
* Create directory util function
|
|
7
|
-
*/
|
|
8
|
-
const createAppDirFunction = (baseDir) => {
|
|
9
|
-
return (...args) => utils_1.path.resolve(baseDir, ...args);
|
|
10
|
-
};
|
|
11
|
-
exports.createAppDirFunction = createAppDirFunction;
|
|
12
|
-
/**
|
|
13
|
-
* Create directory utils for vuepress app
|
|
14
|
-
*/
|
|
15
|
-
const createAppDir = (options) => {
|
|
16
|
-
const cache = exports.createAppDirFunction(options.cache);
|
|
17
|
-
const temp = exports.createAppDirFunction(options.temp);
|
|
18
|
-
const source = exports.createAppDirFunction(options.source);
|
|
19
|
-
const dest = exports.createAppDirFunction(options.dest);
|
|
20
|
-
const publicDir = exports.createAppDirFunction(options.public);
|
|
21
|
-
// @vuepress/client
|
|
22
|
-
const client = exports.createAppDirFunction(utils_1.path.resolve(require.resolve('@vuepress/client/package.json'), '..'));
|
|
23
|
-
return {
|
|
24
|
-
cache,
|
|
25
|
-
temp,
|
|
26
|
-
source,
|
|
27
|
-
dest,
|
|
28
|
-
client,
|
|
29
|
-
public: publicDir,
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.createAppDir = createAppDir;
|
package/lib/app/createAppEnv.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAppEnv = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Create environment flags for vuepress app
|
|
6
|
-
*/
|
|
7
|
-
const createAppEnv = (options) => ({
|
|
8
|
-
isProd: process.env.NODE_ENV === 'production',
|
|
9
|
-
isTest: process.env.NODE_ENV === 'test',
|
|
10
|
-
isDev: process.env.NODE_ENV === 'development',
|
|
11
|
-
isDebug: options.debug,
|
|
12
|
-
nodeEnv: process.env.NODE_ENV,
|
|
13
|
-
});
|
|
14
|
-
exports.createAppEnv = createAppEnv;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AppConfig, AppOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Create app options with default values
|
|
4
|
-
*/
|
|
5
|
-
export declare const createAppOptions: ({ base, lang, title, description, head, locales, theme, themeConfig, bundler, bundlerConfig, source, dest, temp, cache, public: publicDir, markdown, host, port, debug, open, evergreen, pagePatterns, templateDev, templateSSR, shouldPreload, shouldPrefetch, }: AppConfig) => AppOptions;
|