diff --git a/packages/@vuepress/plugin-notification/.npmignore b/packages/@vuepress/plugin-notification/.npmignore deleted file mode 100644 index 18f0a334a4..0000000000 --- a/packages/@vuepress/plugin-notification/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -__tests__ -__mocks__ \ No newline at end of file diff --git a/packages/@vuepress/plugin-notification/README.md b/packages/@vuepress/plugin-notification/README.md deleted file mode 100644 index 52738f0b2e..0000000000 --- a/packages/@vuepress/plugin-notification/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# @vuepress/plugin-notification - -> notification plugin for vuepress - -See [documentation](https://vuepress.vuejs.org/plugin/official/plugin-notification.html). diff --git a/packages/@vuepress/plugin-notification/enhanceAppFile.js b/packages/@vuepress/plugin-notification/enhanceAppFile.js deleted file mode 100644 index 995c4d5cf7..0000000000 --- a/packages/@vuepress/plugin-notification/enhanceAppFile.js +++ /dev/null @@ -1,9 +0,0 @@ -import './index.styl' - -export default ({ Vue, isServer }) => { - if (!isServer) { - import('vue-toasted' /* webpackChunkName: "notification" */).then((module) => { - Vue.use(module.default) - }) - } -} diff --git a/packages/@vuepress/plugin-notification/index.js b/packages/@vuepress/plugin-notification/index.js deleted file mode 100644 index 18d505ac33..0000000000 --- a/packages/@vuepress/plugin-notification/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const path = require('path') - -module.exports = { - enhanceAppFiles: path.resolve(__dirname, './enhanceAppFile.js') -} diff --git a/packages/@vuepress/plugin-notification/index.styl b/packages/@vuepress/plugin-notification/index.styl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/@vuepress/plugin-notification/package.json b/packages/@vuepress/plugin-notification/package.json deleted file mode 100644 index 595ff01349..0000000000 --- a/packages/@vuepress/plugin-notification/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@vuepress/plugin-notification", - "version": "1.0.0-alpha.42", - "description": "notification plugin for vuepress", - "main": "index.js", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/vuepress.git", - "directory": "packages/@vuepress/plugin-notification" - }, - "keywords": [ - "documentation", - "vue", - "vuepress", - "generator" - ], - "dependencies": { - "vue-toasted": "^1.1.25" - }, - "author": "ULIVZ ", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/vuepress/issues" - }, - "homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-notification#readme" -} diff --git a/packages/docs/docs/.vuepress/config.js b/packages/docs/docs/.vuepress/config.js index a76f0e22e7..ea960501b5 100755 --- a/packages/docs/docs/.vuepress/config.js +++ b/packages/docs/docs/.vuepress/config.js @@ -70,7 +70,6 @@ module.exports = ctx => ({ updatePopup: true }], ['@vuepress/medium-zoom', true], - ['@vuepress/notification', true], ['@vuepress/google-analytics', { ga: 'UA-128189152-1' }], diff --git a/packages/docs/docs/.vuepress/enhanceApp.js b/packages/docs/docs/.vuepress/enhanceApp.js index 18926a4d38..66849fe619 100644 --- a/packages/docs/docs/.vuepress/enhanceApp.js +++ b/packages/docs/docs/.vuepress/enhanceApp.js @@ -1,8 +1,7 @@ -export default ({ - Vue, // the version of Vue being used in the VuePress app - options, // the options for the root Vue instance - router, // the router instance for the app - siteData // site metadata -}) => { - // ...apply enhancements to the app +export default ({ Vue, isServer }) => { + if (!isServer) { + import('vue-toasted' /* webpackChunkName: "notification" */).then((module) => { + Vue.use(module.default) + }) + } } diff --git a/packages/docs/package.json b/packages/docs/package.json index f3f3b87025..a52538e1b0 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -28,10 +28,10 @@ "@vuepress/plugin-google-analytics": "^1.0.0-alpha.42", "@vuepress/plugin-i18n-ui": "^1.0.0-alpha.42", "@vuepress/plugin-medium-zoom": "^1.0.0-alpha.42", - "@vuepress/plugin-notification": "^1.0.0-alpha.42", "@vuepress/plugin-pwa": "^1.0.0-alpha.42", "@vuepress/theme-vue": "^1.0.0-alpha.42", "vuepress": "^1.0.0-alpha.42", - "vuepress-plugin-flowchart": "^1.4.2" + "vuepress-plugin-flowchart": "^1.4.2", + "vue-toasted": "^1.1.25" } }