Skip to content

Commit

Permalink
refactor: uniform plugin file naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Dec 23, 2018
1 parent 25db1ba commit 1630a5b
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-active-header-links/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { path } = require('@vuepress/shared-utils')

module.exports = (options) => ({
clientRootMixin: path.resolve(__dirname, 'mixin.js'),
clientRootMixin: path.resolve(__dirname, 'clientRootMixin.js'),
define: {
AHL_SIDEBAR_LINK_SELECTOR: options.sidebarLinkSelector || '.sidebar-link',
AHL_HEADER_ANCHOR_SELECTOR: options.headerAnchorSelector || '.header-anchor'
Expand Down
6 changes: 3 additions & 3 deletions packages/@vuepress/plugin-back-to-top/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const { path } = require('@vuepress/shared-utils')

module.exports = (options, context) => ({
module.exports = {
enhanceAppFiles: [
path.resolve(__dirname, 'client.js')
path.resolve(__dirname, 'enhanceAppFile.js')
],

globalUIComponents: 'BackToTop'
})
}
4 changes: 1 addition & 3 deletions packages/@vuepress/plugin-blog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ module.exports = (options, ctx) => {
]
},

enhanceAppFiles: [
path.resolve(__dirname, 'clientPlugin.js')
]
enhanceAppFiles: path.resolve(__dirname, 'enhanceAppFile.js')
}
}
4 changes: 1 addition & 3 deletions packages/@vuepress/plugin-google-analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ module.exports = (options = {}, context) => ({
return { GA_ID }
},

enhanceAppFiles: [
path.resolve(__dirname, 'inject.js')
]
enhanceAppFiles: path.resolve(__dirname, 'enhanceAppFile.js')
})
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-medium-zoom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = (options, context) => ({
define: {
SELECTOR: options.selector || '.content img'
},
clientRootMixin: path.resolve(__dirname, 'mixin.js')
clientRootMixin: path.resolve(__dirname, 'clientRootMixin.js')
})
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-notification/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')

module.exports = {
enhanceAppFiles: path.resolve(__dirname, './client.js')
enhanceAppFiles: path.resolve(__dirname, './enhanceAppFile.js')
}
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function getIntervallers (max, interval) {

module.exports = (options, ctx) => ({
enhanceAppFiles: [
path.resolve(__dirname, 'clientPlugin.js')
path.resolve(__dirname, 'enhanceAppFile.js')
],

ready () {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-pwa/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = (options, context) => ({

globalUIComponents: options.popupComponent || 'SWUpdatePopup',

enhanceAppFiles: path.resolve(__dirname, 'lib/inject.js'),
enhanceAppFiles: path.resolve(__dirname, 'lib/enhanceAppFile.js'),

async generated () {
const { serviceWorker } = options
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/@vuepress/plugin-search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = (options) => ({
'@SearchBox':
path.resolve(__dirname, 'SearchBox.vue')
},

define: {
SEARCH_MAX_SUGGESTIONS: options.searchMaxSuggestions || 5,
SEARCH_PATHS: options.test || null
Expand Down

0 comments on commit 1630a5b

Please sign in to comment.