@vuepress/core
Advanced tools
Comparing version 2.0.0-beta.43 to 2.0.0-beta.44
@@ -33,8 +33,4 @@ "use strict"; | ||
await (0, prepare_1.prepareSiteData)(app); | ||
// generate client app enhances file | ||
await (0, prepare_1.prepareClientAppEnhances)(app); | ||
// generate client app root components file | ||
await (0, prepare_1.prepareClientAppRootComponents)(app); | ||
// generate client app setups file | ||
await (0, prepare_1.prepareClientAppSetups)(app); | ||
// generate client configs file | ||
await (0, prepare_1.prepareClientConfigs)(app); | ||
// plugin hook: onPrepared | ||
@@ -41,0 +37,0 @@ await app.pluginApi.hooks.onPrepared.process(app); |
@@ -1,4 +0,2 @@ | ||
export * from './prepareClientAppEnhances'; | ||
export * from './prepareClientAppRootComponents'; | ||
export * from './prepareClientAppSetups'; | ||
export * from './prepareClientConfigs'; | ||
export * from './prepareLayoutComponents'; | ||
@@ -5,0 +3,0 @@ export * from './preparePageComponent'; |
@@ -17,5 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./prepareClientAppEnhances"), exports); | ||
__exportStar(require("./prepareClientAppRootComponents"), exports); | ||
__exportStar(require("./prepareClientAppSetups"), exports); | ||
__exportStar(require("./prepareClientConfigs"), exports); | ||
__exportStar(require("./prepareLayoutComponents"), exports); | ||
@@ -22,0 +20,0 @@ __exportStar(require("./preparePageComponent"), exports); |
@@ -17,6 +17,4 @@ "use strict"; | ||
extendsBundlerOptions: (0, createHookQueue_1.createHookQueue)('extendsBundlerOptions'), | ||
// client files hooks | ||
clientAppEnhanceFiles: (0, createHookQueue_1.createHookQueue)('clientAppEnhanceFiles'), | ||
clientAppRootComponentFiles: (0, createHookQueue_1.createHookQueue)('clientAppRootComponentFiles'), | ||
clientAppSetupFiles: (0, createHookQueue_1.createHookQueue)('clientAppSetupFiles'), | ||
// client config file hooks | ||
clientConfigFile: (0, createHookQueue_1.createHookQueue)('clientConfigFile'), | ||
// bundler hooks | ||
@@ -23,0 +21,0 @@ alias: (0, createHookQueue_1.createHookQueue)('alias'), |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createPluginApiRegisterHooks = void 0; | ||
const normalizeClientFilesHook_1 = require("./normalizeClientFilesHook"); | ||
const normalizeClientConfigFileHook_1 = require("./normalizeClientConfigFileHook"); | ||
const normalizeReturnObjectHook_1 = require("./normalizeReturnObjectHook"); | ||
const createPluginApiRegisterHooks = (plugins, hooks) => () => { | ||
plugins.forEach(({ name: pluginName, alias, define, clientAppEnhanceFiles, clientAppRootComponentFiles, clientAppSetupFiles, ...commonHooks }) => { | ||
plugins.forEach(({ name: pluginName, alias, define, clientConfigFile, ...commonHooks }) => { | ||
/** | ||
@@ -23,20 +23,8 @@ * hooks that need to be normalized | ||
} | ||
if (clientAppEnhanceFiles) { | ||
hooks.clientAppEnhanceFiles.add({ | ||
if (clientConfigFile) { | ||
hooks.clientConfigFile.add({ | ||
pluginName, | ||
hook: (0, normalizeClientFilesHook_1.normalizeClientFilesHook)(clientAppEnhanceFiles), | ||
hook: (0, normalizeClientConfigFileHook_1.normalizeClientConfigFileHook)(clientConfigFile), | ||
}); | ||
} | ||
if (clientAppRootComponentFiles) { | ||
hooks.clientAppRootComponentFiles.add({ | ||
pluginName, | ||
hook: (0, normalizeClientFilesHook_1.normalizeClientFilesHook)(clientAppRootComponentFiles), | ||
}); | ||
} | ||
if (clientAppSetupFiles) { | ||
hooks.clientAppSetupFiles.add({ | ||
pluginName, | ||
hook: (0, normalizeClientFilesHook_1.normalizeClientFilesHook)(clientAppSetupFiles), | ||
}); | ||
} | ||
/** | ||
@@ -43,0 +31,0 @@ * common hooks |
@@ -5,3 +5,3 @@ export * from './createHookQueue'; | ||
export * from './createPluginApiRegisterHooks'; | ||
export * from './normalizeClientConfigFileHook'; | ||
export * from './normalizeReturnObjectHook'; | ||
export * from './normalizeClientFilesHook'; |
@@ -21,3 +21,3 @@ "use strict"; | ||
__exportStar(require("./createPluginApiRegisterHooks"), exports); | ||
__exportStar(require("./normalizeClientConfigFileHook"), exports); | ||
__exportStar(require("./normalizeReturnObjectHook"), exports); | ||
__exportStar(require("./normalizeClientFilesHook"), exports); |
@@ -15,3 +15,3 @@ import type { Markdown, MarkdownOptions } from '@vuepress/markdown'; | ||
export declare type ExtendsHook<T> = Hook<(extendable: T, app: App) => PromiseOrNot<void>>; | ||
export declare type ClientFilesHook = Hook<string | string[] | ((app: App) => PromiseOrNot<string | string[]>), (app: App) => Promise<string[]>>; | ||
export declare type ClientConfigFileHook = Hook<string | ((app: App) => PromiseOrNot<string>), (app: App) => Promise<string>>; | ||
export declare type ReturnObjectHook = Hook<Record<string, any> | ((app: App) => PromiseOrNot<Record<string, any>>), (app: App) => Promise<Record<string, any>>>; | ||
@@ -31,5 +31,3 @@ /** | ||
extendsBundlerOptions: ExtendsHook<any>; | ||
clientAppEnhanceFiles: ClientFilesHook; | ||
clientAppRootComponentFiles: ClientFilesHook; | ||
clientAppSetupFiles: ClientFilesHook; | ||
clientConfigFile: ClientConfigFileHook; | ||
alias: ReturnObjectHook; | ||
@@ -36,0 +34,0 @@ define: ReturnObjectHook; |
{ | ||
"name": "@vuepress/core", | ||
"version": "2.0.0-beta.43", | ||
"version": "2.0.0-beta.44", | ||
"description": "Core package of VuePress", | ||
@@ -25,6 +25,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@vuepress/client": "2.0.0-beta.43", | ||
"@vuepress/markdown": "2.0.0-beta.43", | ||
"@vuepress/shared": "2.0.0-beta.43", | ||
"@vuepress/utils": "2.0.0-beta.43", | ||
"@vuepress/client": "2.0.0-beta.44", | ||
"@vuepress/markdown": "2.0.0-beta.44", | ||
"@vuepress/shared": "2.0.0-beta.44", | ||
"@vuepress/utils": "2.0.0-beta.44", | ||
"gray-matter": "^4.0.3", | ||
@@ -31,0 +31,0 @@ "toml": "^3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86855
136
2480
+ Added@vuepress/client@2.0.0-beta.44(transitive)
+ Added@vuepress/markdown@2.0.0-beta.44(transitive)
+ Added@vuepress/shared@2.0.0-beta.44(transitive)
+ Added@vuepress/utils@2.0.0-beta.44(transitive)
- Removed@vuepress/client@2.0.0-beta.43(transitive)
- Removed@vuepress/markdown@2.0.0-beta.43(transitive)
- Removed@vuepress/shared@2.0.0-beta.43(transitive)
- Removed@vuepress/utils@2.0.0-beta.43(transitive)