diff options
Diffstat (limited to 'node_modules/vuepress/lib/app')
22 files changed, 0 insertions, 1503 deletions
diff --git a/node_modules/vuepress/lib/app/.temp/enhanceApp.js b/node_modules/vuepress/lib/app/.temp/enhanceApp.js deleted file mode 100644 index 16a79b36..00000000 --- a/node_modules/vuepress/lib/app/.temp/enhanceApp.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "/Users/ruki/projects/personal/xmake-docs/src/.vuepress/enhanceApp.js"
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/.temp/override.styl b/node_modules/vuepress/lib/app/.temp/override.styl deleted file mode 100644 index c7969f18..00000000 --- a/node_modules/vuepress/lib/app/.temp/override.styl +++ /dev/null @@ -1 +0,0 @@ -@import("/Users/ruki/projects/personal/xmake-docs/src/.vuepress/override.styl")
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/.temp/routes.js b/node_modules/vuepress/lib/app/.temp/routes.js deleted file mode 100644 index 1c8d20d6..00000000 --- a/node_modules/vuepress/lib/app/.temp/routes.js +++ /dev/null @@ -1,178 +0,0 @@ -import Vue from 'vue' - -import ThemeLayout from '@themeLayout' -import ThemeNotFound from '@themeNotFound' -import { injectMixins } from '@app/util' -import rootMixins from '@app/root-mixins' - -injectMixins(ThemeLayout, rootMixins) -injectMixins(ThemeNotFound, rootMixins) - -export const routes = [ - { - name: "v-2614641d01439", - path: "/", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/README.md").then(comp => { - Vue.component("v-2614641d01439", comp.default) - next() - }) - } - }, - { - path: "/index.html", - redirect: "/" - }, - { - name: "v-ca0d3c6d3b947", - path: "/api/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/api/introduction.md").then(comp => { - Vue.component("v-ca0d3c6d3b947", comp.default) - next() - }) - } - }, - { - name: "v-4cee7b9659743", - path: "/guide/faq.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/guide/faq.md").then(comp => { - Vue.component("v-4cee7b9659743", comp.default) - next() - }) - } - }, - { - name: "v-209fc19462fa6", - path: "/guide/getting-started.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/guide/getting-started.md").then(comp => { - Vue.component("v-209fc19462fa6", comp.default) - next() - }) - } - }, - { - name: "v-3ab176aebc1f4", - path: "/guide/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/guide/introduction.md").then(comp => { - Vue.component("v-3ab176aebc1f4", comp.default) - next() - }) - } - }, - { - name: "v-3b936eb8ef4c1", - path: "/guide/sponsors.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/guide/sponsors.md").then(comp => { - Vue.component("v-3b936eb8ef4c1", comp.default) - next() - }) - } - }, - { - name: "v-ba9eb56bb695a", - path: "/plugin/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/plugin/introduction.md").then(comp => { - Vue.component("v-ba9eb56bb695a", comp.default) - next() - }) - } - }, - { - name: "v-ed7962dcbc27f", - path: "/zh/", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/README.md").then(comp => { - Vue.component("v-ed7962dcbc27f", comp.default) - next() - }) - } - }, - { - path: "/zh/index.html", - redirect: "/zh/" - }, - { - name: "v-540f63bba413e", - path: "/zh/api/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/api/introduction.md").then(comp => { - Vue.component("v-540f63bba413e", comp.default) - next() - }) - } - }, - { - name: "v-02760b3923029", - path: "/zh/guide/faq.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/guide/faq.md").then(comp => { - Vue.component("v-02760b3923029", comp.default) - next() - }) - } - }, - { - name: "v-60de9668a20a5", - path: "/zh/guide/getting-started.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/guide/getting-started.md").then(comp => { - Vue.component("v-60de9668a20a5", comp.default) - next() - }) - } - }, - { - name: "v-0f1def6098c93", - path: "/zh/guide/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/guide/introduction.md").then(comp => { - Vue.component("v-0f1def6098c93", comp.default) - next() - }) - } - }, - { - name: "v-de6097dc9e908", - path: "/zh/guide/sponsors.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/guide/sponsors.md").then(comp => { - Vue.component("v-de6097dc9e908", comp.default) - next() - }) - } - }, - { - name: "v-06da4c6c1298e", - path: "/zh/plugin/introduction.html", - component: ThemeLayout, - beforeEnter: (to, from, next) => { - import("/Users/ruki/projects/personal/xmake-docs/src/zh/plugin/introduction.md").then(comp => { - Vue.component("v-06da4c6c1298e", comp.default) - next() - }) - } - }, - { - path: '*', - component: ThemeNotFound - } -]
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/.temp/siteData.js b/node_modules/vuepress/lib/app/.temp/siteData.js deleted file mode 100644 index 6e6bc4c8..00000000 --- a/node_modules/vuepress/lib/app/.temp/siteData.js +++ /dev/null @@ -1,744 +0,0 @@ -export const siteData = { - "title": "", - "description": "", - "base": "/", - "pages": [ - { - "key": "v-2614641d01439", - "path": "/", - "lastUpdated": 1541598789000, - "title": "Home", - "headers": [ - { - "level": 2, - "title": "Simple description", - "slug": "simple-description" - }, - { - "level": 2, - "title": "Package dependences", - "slug": "package-dependences" - }, - { - "level": 2, - "title": "Build project", - "slug": "build-project" - }, - { - "level": 2, - "title": "Run target", - "slug": "run-target" - }, - { - "level": 2, - "title": "Debug target", - "slug": "debug-target" - }, - { - "level": 2, - "title": "Configure platform", - "slug": "configure-platform" - }, - { - "level": 2, - "title": "Menu configuration", - "slug": "menu-configuration" - }, - { - "level": 2, - "title": "Package management", - "slug": "package-management" - }, - { - "level": 2, - "title": "Supported platforms", - "slug": "supported-platforms" - }, - { - "level": 2, - "title": "Supported Languages", - "slug": "supported-languages" - }, - { - "level": 2, - "title": "Supported Projects", - "slug": "supported-projects" - }, - { - "level": 2, - "title": "Builtin Plugins", - "slug": "builtin-plugins" - }, - { - "level": 2, - "title": "More Plugins", - "slug": "more-plugins" - }, - { - "level": 2, - "title": "IDE/Editor Integration", - "slug": "ide-editor-integration" - }, - { - "level": 2, - "title": "More Examples", - "slug": "more-examples" - }, - { - "level": 2, - "title": "Project Examples", - "slug": "project-examples" - }, - { - "level": 2, - "title": "Example Video", - "slug": "example-video" - }, - { - "level": 2, - "title": "Contacts", - "slug": "contacts" - } - ], - "frontmatter": { - "home": true, - "heroImage": "/hero.png", - "actionText": "Get Started →", - "actionLink": "/guide/getting-started", - "features": [ - { - "title": "Why", - "details": "Making development and building easier, so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project." - }, - { - "title": "Powerful", - "details": "Provides lots of features (e.g. package, install, plugin, macro, action, option, task and etc)." - }, - { - "title": "Cross-platform", - "details": "Supports windows, macOS, linux, android, ios." - } - ], - "footer": "Apache-2.0 Licensed | Copyright © 2015-present tboox.org" - } - }, - { - "key": "v-ca0d3c6d3b947", - "path": "/api/introduction.html", - "lastUpdated": 1541598789000, - "title": "Title1", - "headers": [ - { - "level": 2, - "title": "Title2", - "slug": "title2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-2" - }, - { - "level": 2, - "title": "Title2", - "slug": "title2-2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-3" - } - ] - }, - { - "key": "v-4cee7b9659743", - "path": "/guide/faq.html", - "lastUpdated": 1541598789000, - "title": "FAQ", - "headers": [ - { - "level": 2, - "title": "How to get verbose command-line arguments info?", - "slug": "how-to-get-verbose-command-line-arguments-info" - }, - { - "level": 2, - "title": "How to suppress all output info?", - "slug": "how-to-suppress-all-output-info" - }, - { - "level": 2, - "title": "How to do if xmake fails?", - "slug": "how-to-do-if-xmake-fails" - }, - { - "level": 2, - "title": "How to see verbose compiling warnings?", - "slug": "how-to-see-verbose-compiling-warnings" - }, - { - "level": 2, - "title": "How to scan source code and generate xmake.lua automaticlly", - "slug": "how-to-scan-source-code-and-generate-xmake-lua-automaticlly" - } - ] - }, - { - "key": "v-209fc19462fa6", - "path": "/guide/getting-started.html", - "lastUpdated": 1541598789000, - "title": "Getting Started", - "headers": [ - { - "level": 2, - "title": "Installation", - "slug": "installation" - }, - { - "level": 3, - "title": "Master", - "slug": "master" - }, - { - "level": 3, - "title": "Windows", - "slug": "windows" - }, - { - "level": 3, - "title": "MacOS", - "slug": "macos" - }, - { - "level": 3, - "title": "Linux", - "slug": "linux" - }, - { - "level": 3, - "title": "Compilation", - "slug": "compilation" - }, - { - "level": 2, - "title": "Quick Start", - "slug": "quick-start" - }, - { - "level": 3, - "title": "Create Project", - "slug": "create-project" - }, - { - "level": 3, - "title": "Build Project", - "slug": "build-project" - }, - { - "level": 3, - "title": "Run Program", - "slug": "run-program" - }, - { - "level": 3, - "title": "Debug Program", - "slug": "debug-program" - }, - { - "level": 2, - "title": "Project Examples", - "slug": "project-examples" - }, - { - "level": 3, - "title": "Executable Program", - "slug": "executable-program" - }, - { - "level": 3, - "title": "Static Library Program", - "slug": "static-library-program" - }, - { - "level": 3, - "title": "Share Library Program", - "slug": "share-library-program" - }, - { - "level": 3, - "title": "Qt Program", - "slug": "qt-program" - }, - { - "level": 3, - "title": "Cuda Program", - "slug": "cuda-program" - }, - { - "level": 3, - "title": "WDK Driver Program", - "slug": "wdk-driver-program" - }, - { - "level": 3, - "title": "WinSDK Application Program", - "slug": "winsdk-application-program" - }, - { - "level": 2, - "title": "Configuration", - "slug": "configuration" - }, - { - "level": 3, - "title": "Target Platforms", - "slug": "target-platforms" - }, - { - "level": 3, - "title": "Global Configuration", - "slug": "global-configuration" - }, - { - "level": 3, - "title": "Clean Configuration", - "slug": "clean-configuration" - }, - { - "level": 2, - "title": "Dependency Package Management", - "slug": "dependency-package-management" - }, - { - "level": 3, - "title": "Local Package Mode", - "slug": "local-package-mode" - }, - { - "level": 3, - "title": "System Search Mode", - "slug": "system-search-mode" - }, - { - "level": 3, - "title": "Remote dependency mode", - "slug": "remote-dependency-mode" - } - ] - }, - { - "key": "v-3ab176aebc1f4", - "path": "/guide/introduction.html", - "lastUpdated": 1541598789000, - "title": "Introduction", - "headers": [ - { - "level": 2, - "title": "Introduction", - "slug": "introduction" - } - ] - }, - { - "key": "v-3b936eb8ef4c1", - "path": "/guide/sponsors.html", - "lastUpdated": 1541598789000, - "title": "Sponsors" - }, - { - "key": "v-ba9eb56bb695a", - "path": "/plugin/introduction.html", - "lastUpdated": 1541598789000, - "title": "Title1", - "headers": [ - { - "level": 2, - "title": "Title2", - "slug": "title2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-2" - }, - { - "level": 2, - "title": "Title2", - "slug": "title2-2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-3" - } - ] - }, - { - "key": "v-ed7962dcbc27f", - "path": "/zh/", - "lastUpdated": 1541598789000, - "title": "Home", - "headers": [ - { - "level": 2, - "title": "简单的工程描述", - "slug": "简单的工程描述" - }, - { - "level": 2, - "title": "包依赖描述", - "slug": "包依赖描述" - }, - { - "level": 2, - "title": "构建工程", - "slug": "构建工程" - }, - { - "level": 2, - "title": "运行目标", - "slug": "运行目标" - }, - { - "level": 2, - "title": "调试程序", - "slug": "调试程序" - }, - { - "level": 2, - "title": "配置平台", - "slug": "配置平台" - }, - { - "level": 2, - "title": "图形化菜单配置", - "slug": "图形化菜单配置" - }, - { - "level": 2, - "title": "包依赖管理", - "slug": "包依赖管理" - }, - { - "level": 2, - "title": "支持平台", - "slug": "支持平台" - }, - { - "level": 2, - "title": "支持语言", - "slug": "支持语言" - }, - { - "level": 2, - "title": "工程类型", - "slug": "工程类型" - }, - { - "level": 2, - "title": "内置插件", - "slug": "内置插件" - }, - { - "level": 2, - "title": "更多插件", - "slug": "更多插件" - }, - { - "level": 2, - "title": "IDE和编辑器插件", - "slug": "ide和编辑器插件" - }, - { - "level": 2, - "title": "更多例子", - "slug": "更多例子" - }, - { - "level": 2, - "title": "项目例子", - "slug": "项目例子" - }, - { - "level": 2, - "title": "演示视频", - "slug": "演示视频" - }, - { - "level": 2, - "title": "联系方式", - "slug": "联系方式" - } - ], - "frontmatter": { - "home": true, - "heroImage": "/hero.png", - "actionText": "快速上手 →", - "actionLink": "/zh/guide/getting-started", - "features": [ - { - "title": "为什么使用", - "details": "让开发者更加关注于项目本身开发,简化项目的描述和构建,并且提供平台无关性,使得一次编写,随处构建" - }, - { - "title": "强大", - "details": "提供大量的实用特性(例如:插件扩展、脚本宏记录、批量打包、自动文档生成等常用插件)" - }, - { - "title": "跨平台", - "details": "支持windows, macOS, linux, android, ios" - } - ], - "footer": "Apache-2.0 Licensed | Copyright © 2015-present tboox.org" - } - }, - { - "key": "v-540f63bba413e", - "path": "/zh/api/introduction.html", - "lastUpdated": 1541598789000, - "title": "Title1", - "headers": [ - { - "level": 2, - "title": "Title2", - "slug": "title2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-2" - }, - { - "level": 2, - "title": "Title2", - "slug": "title2-2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-3" - } - ] - }, - { - "key": "v-02760b3923029", - "path": "/zh/guide/faq.html", - "lastUpdated": 1541598789000 - }, - { - "key": "v-60de9668a20a5", - "path": "/zh/guide/getting-started.html", - "lastUpdated": 1541598789000, - "title": "快速开始", - "headers": [ - { - "level": 2, - "title": "编译", - "slug": "编译" - }, - { - "level": 2, - "title": "例子", - "slug": "例子" - } - ] - }, - { - "key": "v-0f1def6098c93", - "path": "/zh/guide/introduction.html", - "lastUpdated": 1541598789000, - "title": "简介", - "headers": [ - { - "level": 2, - "title": "特性", - "slug": "特性" - }, - { - "level": 2, - "title": "项目例子", - "slug": "项目例子" - }, - { - "level": 2, - "title": "联系方式", - "slug": "联系方式" - } - ] - }, - { - "key": "v-de6097dc9e908", - "path": "/zh/guide/sponsors.html", - "lastUpdated": 1541598789000 - }, - { - "key": "v-06da4c6c1298e", - "path": "/zh/plugin/introduction.html", - "lastUpdated": 1541598789000, - "title": "Title1", - "headers": [ - { - "level": 2, - "title": "Title2", - "slug": "title2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-2" - }, - { - "level": 2, - "title": "Title2", - "slug": "title2-2" - }, - { - "level": 3, - "title": "Title3", - "slug": "title3-3" - } - ] - } - ], - "themeConfig": { - "repo": "tboox/xmake", - "docsRepo": "tboox/xmake-docs", - "docsDir": "src", - "editLinks": true, - "sidebarDepth": 2, - "locales": { - "/": { - "label": "English", - "selectText": "Languages", - "editLinkText": "Edit this page on GitHub", - "lastUpdated": "Last Updated", - "nav": [ - { - "text": "Guide", - "link": "/guide/introduction" - }, - { - "text": "Plugin", - "link": "/plugin/introduction" - }, - { - "text": "API", - "link": "/api/introduction" - }, - { - "text": "Articles", - "link": "http://www.tboox.org/category/#xmake" - }, - { - "text": "Feedback", - "link": "https://github.com/tboox/xmake/issues" - }, - { - "text": "Community", - "link": "https://www.reddit.com/r/tboox/" - }, - { - "text": "Donation", - "link": "http://tboox.org/cn/donation/" - } - ], - "sidebar": { - "/guide/": [ - "introduction", - "getting-started", - "faq", - "sponsors" - ], - "/plugin/": [ - "introduction" - ], - "/api/": [ - "introduction" - ] - } - }, - "/zh/": { - "label": "简体中文", - "selectText": "选择语言", - "editLinkText": "在 GitHub 上编辑此页", - "lastUpdated": "上次更新", - "nav": [ - { - "text": "指南", - "link": "/zh/guide/introduction" - }, - { - "text": "插件", - "link": "/zh/plugin/introduction" - }, - { - "text": "接口", - "link": "/zh/api/introduction" - }, - { - "text": "文章", - "link": "http://www.tboox.org/cn/category/#xmake" - }, - { - "text": "反馈", - "link": "https://github.com/tboox/xmake/issues" - }, - { - "text": "社区", - "link": "https://www.reddit.com/r/tboox/" - }, - { - "text": "捐助", - "link": "http://tboox.org/cn/donation/" - } - ], - "sidebar": { - "/zh/guide/": [ - "introduction", - "getting-started", - "faq", - "sponsors" - ], - "/zh/plugin/": [ - "introduction" - ], - "/zh/api/": [ - "introduction" - ] - } - } - } - }, - "locales": { - "/": { - "lang": "en-US", - "title": "xmake", - "description": "A cross-platform build utility based on Lua" - }, - "/zh/": { - "lang": "zh-CN", - "title": "xmake", - "description": "一个基于Lua的轻量级跨平台自动构建工具" - } - } -}
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/.temp/style.styl b/node_modules/vuepress/lib/app/.temp/style.styl deleted file mode 100644 index b3deab99..00000000 --- a/node_modules/vuepress/lib/app/.temp/style.styl +++ /dev/null @@ -1 +0,0 @@ -@import("/Users/ruki/projects/personal/xmake-docs/src/.vuepress/style.styl")
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/.temp/themeEnhanceApp.js b/node_modules/vuepress/lib/app/.temp/themeEnhanceApp.js deleted file mode 100644 index 03c095d5..00000000 --- a/node_modules/vuepress/lib/app/.temp/themeEnhanceApp.js +++ /dev/null @@ -1 +0,0 @@ -export default function () {}
\ No newline at end of file diff --git a/node_modules/vuepress/lib/app/SWUpdateEvent.js b/node_modules/vuepress/lib/app/SWUpdateEvent.js deleted file mode 100644 index fe6ab31c..00000000 --- a/node_modules/vuepress/lib/app/SWUpdateEvent.js +++ /dev/null @@ -1,43 +0,0 @@ -export default class SWUpdateEvent { - constructor (registration) { - Object.defineProperty(this, 'registration', { - value: registration, - configurable: true, - writable: true - }) - } - - /** - * Check if the new service worker exists or not. - */ - update () { - return this.registration.update() - } - - /** - * Activate new service worker to work 'location.reload()' with new data. - */ - skipWaiting () { - const worker = this.registration.waiting - if (!worker) { - return Promise.resolve() - } - - console.log('[vuepress:sw] Doing worker.skipWaiting().') - return new Promise((resolve, reject) => { - const channel = new MessageChannel() - - channel.port1.onmessage = (event) => { - console.log('[vuepress:sw] Done worker.skipWaiting().') - if (event.data.error) { - reject(event.data.error) - } else { - resolve(event.data) - } - } - - worker.postMessage({ type: 'skip-waiting' }, [channel.port2]) - }) - } -} - diff --git a/node_modules/vuepress/lib/app/app.js b/node_modules/vuepress/lib/app/app.js deleted file mode 100644 index 511abbd4..00000000 --- a/node_modules/vuepress/lib/app/app.js +++ /dev/null @@ -1,102 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' -import dataMixin from './dataMixin' -import store from './store' -import { routes } from '@temp/routes' -import { siteData } from '@temp/siteData' -import enhanceApp from '@temp/enhanceApp' -import themeEnhanceApp from '@temp/themeEnhanceApp' - -// generated from user config -import('@temp/style.styl') - -// built-in components -import Content from './components/Content' -import OutboundLink from './components/OutboundLink.vue' -import ClientOnly from './components/ClientOnly' - -// suggest dev server restart on base change -if (module.hot) { - const prevBase = siteData.base - module.hot.accept('./.temp/siteData', () => { - if (siteData.base !== prevBase) { - window.alert( - `[vuepress] Site base has changed. ` + - `Please restart dev server to ensure correct asset paths.` - ) - } - }) -} - -Vue.config.productionTip = false -Vue.use(Router) -// mixin for exposing $site and $page -Vue.mixin(dataMixin(siteData)) -// component for rendering markdown content and setting title etc. -Vue.component('Content', Content) -Vue.component('OutboundLink', OutboundLink) -Vue.component('Badge', () => import('./components/Badge.vue')) -// component for client-only content -Vue.component('ClientOnly', ClientOnly) - -// global helper for adding base path to absolute urls -Vue.prototype.$withBase = function (path) { - const base = this.$site.base - if (path.charAt(0) === '/') { - return base + path.slice(1) - } else { - return path - } -} - -export function createApp () { - const router = new Router({ - base: siteData.base, - mode: 'history', - fallback: false, - routes, - scrollBehavior: (to, from, saved) => { - if (saved) { - return saved - } else if (to.hash) { - if (store.disableScrollBehavior) { - return false - } - return { - selector: to.hash - } - } else { - return { x: 0, y: 0 } - } - } - }) - - // redirect /foo to /foo/ - router.beforeEach((to, from, next) => { - if (!/(\/|\.html)$/.test(to.path)) { - next(Object.assign({}, to, { - path: to.path + '/' - })) - } else { - next() - } - }) - - const options = {} - - themeEnhanceApp({ Vue, options, router, siteData }) - enhanceApp({ Vue, options, router, siteData }) - - const app = new Vue( - Object.assign(options, { - router, - render (h) { - return h('div', { attrs: { id: 'app' }}, [ - h('router-view', { ref: 'layout' }) - ]) - } - }) - ) - - return { app, router } -} diff --git a/node_modules/vuepress/lib/app/clientEntry.js b/node_modules/vuepress/lib/app/clientEntry.js deleted file mode 100644 index dc86314a..00000000 --- a/node_modules/vuepress/lib/app/clientEntry.js +++ /dev/null @@ -1,74 +0,0 @@ -/* global BASE_URL, GA_ID, ga, SW_ENABLED, VUEPRESS_VERSION, LAST_COMMIT_HASH*/ - -import { createApp } from './app' -import SWUpdateEvent from './SWUpdateEvent' -import { register } from 'register-service-worker' - -const { app, router } = createApp() - -window.__VUEPRESS_VERSION__ = { - version: VUEPRESS_VERSION, - hash: LAST_COMMIT_HASH -} - -// Google analytics integration -if (process.env.NODE_ENV === 'production' && GA_ID) { - (function (i, s, o, g, r, a, m) { - i['GoogleAnalyticsObject'] = r - i[r] = i[r] || function () { - (i[r].q = i[r].q || []).push(arguments) - } - i[r].l = 1 * new Date() - a = s.createElement(o) - m = s.getElementsByTagName(o)[0] - a.async = 1 - a.src = g - m.parentNode.insertBefore(a, m) - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga') - - ga('create', GA_ID, 'auto') - ga('send', 'pageview') - - router.afterEach(function (to) { - ga('set', 'page', app.$withBase(to.fullPath)) - ga('send', 'pageview') - }) -} - -router.onReady(() => { - app.$mount('#app') - - // Register service worker - if (process.env.NODE_ENV === 'production' && - SW_ENABLED && - window.location.protocol === 'https:') { - register(`${BASE_URL}service-worker.js`, { - ready () { - console.log('[vuepress:sw] Service worker is active.') - app.$refs.layout.$emit('sw-ready') - }, - cached (registration) { - console.log('[vuepress:sw] Content has been cached for offline use.') - app.$refs.layout.$emit('sw-cached', new SWUpdateEvent(registration)) - }, - updated (registration) { - console.log('[vuepress:sw] Content updated.') - app.$refs.layout.$emit('sw-updated', new SWUpdateEvent(registration)) - }, - offline () { - console.log('[vuepress:sw] No internet connection found. App is running in offline mode.') - app.$refs.layout.$emit('sw-offline') - }, - error (err) { - console.error('[vuepress:sw] Error during service worker registration:', err) - app.$refs.layout.$emit('sw-error', err) - if (GA_ID) { - ga('send', 'exception', { - exDescription: err.message, - exFatal: false - }) - } - } - }) - } -}) diff --git a/node_modules/vuepress/lib/app/components/Badge.vue b/node_modules/vuepress/lib/app/components/Badge.vue deleted file mode 100644 index 17e6ba6e..00000000 --- a/node_modules/vuepress/lib/app/components/Badge.vue +++ /dev/null @@ -1,46 +0,0 @@ -<script> -export default { - functional: true, - props: { - type: { - type: String, - default: 'tip' - }, - text: String, - vertical: { - type: String, - default: 'top' - } - }, - render (h, { props, slots }) { - return h('span', { - class: ['badge', props.type, props.vertical] - }, props.text || slots().default) - } -} -</script> - -<style lang="stylus" scoped> -@import '../../default-theme/styles/config.styl' - -.badge - display inline-block - font-size 14px - height 18px - line-height 18px - border-radius 3px - padding 0 6px - color white - margin-right 5px - background-color #42b983 - &.middle - vertical-align middle - &.top - vertical-align top - &.tip, &.green - background-color #42b983 - &.error - background-color #DA5961 //#f66 - &.warning, &.warn, &.yellow - background-color darken(#ffe564, 35%) -</style> diff --git a/node_modules/vuepress/lib/app/components/ClientOnly.js b/node_modules/vuepress/lib/app/components/ClientOnly.js deleted file mode 100644 index c786d1af..00000000 --- a/node_modules/vuepress/lib/app/components/ClientOnly.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - functional: true, - render (h, { parent, children }) { - if (parent._isMounted) { - return children - } else { - parent.$once('hook:mounted', () => { - parent.$forceUpdate() - }) - } - } -} diff --git a/node_modules/vuepress/lib/app/components/Content.js b/node_modules/vuepress/lib/app/components/Content.js deleted file mode 100644 index 46628195..00000000 --- a/node_modules/vuepress/lib/app/components/Content.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - functional: true, - - props: { - custom: { - type: Boolean, - default: true - } - }, - - render (h, { parent, props, data }) { - return h(parent.$page.key, { - class: [props.custom ? 'custom' : '', data.class, data.staticClass], - style: data.style - }) - } -} diff --git a/node_modules/vuepress/lib/app/components/OutboundLink.vue b/node_modules/vuepress/lib/app/components/OutboundLink.vue deleted file mode 100644 index a3aa7f2d..00000000 --- a/node_modules/vuepress/lib/app/components/OutboundLink.vue +++ /dev/null @@ -1,12 +0,0 @@ -<template functional> - <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"> - <path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> - <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon> - </svg> -</template> - -<style lang="stylus"> -.icon.outbound - color #aaa - display inline-block -</style> diff --git a/node_modules/vuepress/lib/app/dataMixin.js b/node_modules/vuepress/lib/app/dataMixin.js deleted file mode 100644 index fd003d92..00000000 --- a/node_modules/vuepress/lib/app/dataMixin.js +++ /dev/null @@ -1,90 +0,0 @@ -import Vue from 'vue' -import { findPageForPath } from './util' - -export default function dataMixin (siteData) { - prepare(siteData) - const store = new Vue({ - data: { siteData } - }) - - if (module.hot) { - module.hot.accept('./.temp/siteData', () => { - prepare(siteData) - store.siteData = siteData - }) - } - - return { - computed: { - $site () { - return store.siteData - }, - $localeConfig () { - const { locales = {}} = this.$site - let targetLang - let defaultLang - for (const path in locales) { - if (path === '/') { - defaultLang = locales[path] - } else if (this.$page.path.indexOf(path) === 0) { - targetLang = locales[path] - } - } - return targetLang || defaultLang || {} - }, - $siteTitle () { - return this.$localeConfig.title || this.$site.title || '' - }, - $title () { - const page = this.$page - const siteTitle = this.$siteTitle - const selfTitle = page.frontmatter.home ? null : ( - page.frontmatter.title || // explicit title - page.title // inferred title - ) - return siteTitle - ? selfTitle - ? (selfTitle + ' | ' + siteTitle) - : siteTitle - : selfTitle || 'VuePress' - }, - $description () { - // #565 hoist description from meta - if (this.$page.frontmatter.meta) { - const descriptionMeta = this.$page.frontmatter.meta.filter(item => item.name === 'description')[0] - if (descriptionMeta) return descriptionMeta.content - } - return this.$page.frontmatter.description || this.$localeConfig.description || this.$site.description || '' - }, - $lang () { - return this.$page.frontmatter.lang || this.$localeConfig.lang || 'en-US' - }, - $localePath () { - return this.$localeConfig.path || '/' - }, - $themeLocaleConfig () { - return (this.$site.themeConfig.locales || {})[this.$localePath] || {} - }, - $page () { - return findPageForPath( - this.$site.pages, - this.$route.path - ) - } - } - } -} - -function prepare (siteData) { - siteData.pages.forEach(page => { - if (!page.frontmatter) { - page.frontmatter = {} - } - }) - if (siteData.locales) { - Object.keys(siteData.locales).forEach(path => { - siteData.locales[path].path = path - }) - } - Object.freeze(siteData) -} diff --git a/node_modules/vuepress/lib/app/index.dev.html b/node_modules/vuepress/lib/app/index.dev.html deleted file mode 100644 index 06f743c5..00000000 --- a/node_modules/vuepress/lib/app/index.dev.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width,initial-scale=1"> - <title></title> - </head> - <body> - <div id="app"></div> - </body> -</html> diff --git a/node_modules/vuepress/lib/app/index.ssr.html b/node_modules/vuepress/lib/app/index.ssr.html deleted file mode 100644 index 32d310a9..00000000 --- a/node_modules/vuepress/lib/app/index.ssr.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<html lang="{{ lang }}"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width,initial-scale=1"> - <title>{{ title }}</title> - <meta name="description" content="{{ description }}"> - {{{ userHeadTags }}} - {{{ pageMeta }}} - {{{ renderResourceHints() }}} - {{{ renderStyles() }}} - </head> - <body> - <!--vue-ssr-outlet--> - {{{ renderScripts() }}} - </body> -</html> diff --git a/node_modules/vuepress/lib/app/root-mixins/activeHeaderLinks.js b/node_modules/vuepress/lib/app/root-mixins/activeHeaderLinks.js deleted file mode 100644 index 6cad69d5..00000000 --- a/node_modules/vuepress/lib/app/root-mixins/activeHeaderLinks.js +++ /dev/null @@ -1,47 +0,0 @@ -import store from '@app/store' -import throttle from 'lodash.throttle' - -export default { - mounted () { - window.addEventListener('scroll', this.onScroll) - }, - methods: { - onScroll: throttle(function () { - this.setActiveHash() - }, 300), - setActiveHash () { - const sidebarLinks = [].slice.call(document.querySelectorAll('.sidebar-link')) - const anchors = [].slice.call(document.querySelectorAll('.header-anchor')) - .filter(anchor => sidebarLinks.some(sidebarLink => sidebarLink.hash === anchor.hash)) - - const scrollTop = Math.max( - window.pageYOffset, - document.documentElement.scrollTop, - document.body.scrollTop - ) - - for (let i = 0; i < anchors.length; i++) { - const anchor = anchors[i] - const nextAnchor = anchors[i + 1] - - const isActive = i === 0 && scrollTop === 0 || - (scrollTop >= anchor.parentElement.offsetTop + 10 && - (!nextAnchor || scrollTop < nextAnchor.parentElement.offsetTop - 10)) - - if (isActive && decodeURIComponent(this.$route.hash) !== decodeURIComponent(anchor.hash)) { - store.disableScrollBehavior = true - this.$router.replace(decodeURIComponent(anchor.hash), () => { - // execute after scrollBehavior handler. - this.$nextTick(() => { - store.disableScrollBehavior = false - }) - }) - return - } - } - } - }, - beforeDestroy () { - window.removeEventListener('scroll', this.onScroll) - } -} diff --git a/node_modules/vuepress/lib/app/root-mixins/index.js b/node_modules/vuepress/lib/app/root-mixins/index.js deleted file mode 100644 index fd966f39..00000000 --- a/node_modules/vuepress/lib/app/root-mixins/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import updateMeta from './updateMeta' -import activeHeaderLinks from '@activeHeaderLinks' - -export default [ - updateMeta, // required - activeHeaderLinks // optional -] diff --git a/node_modules/vuepress/lib/app/root-mixins/updateMeta.js b/node_modules/vuepress/lib/app/root-mixins/updateMeta.js deleted file mode 100644 index ff2703ac..00000000 --- a/node_modules/vuepress/lib/app/root-mixins/updateMeta.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - created () { - if (this.$ssrContext) { - this.$ssrContext.title = this.$title - this.$ssrContext.lang = this.$lang - this.$ssrContext.description = this.$page.description || this.$description - } - }, - - mounted () { - // update title / meta tags - this.currentMetaTags = new Set() - - const updateMeta = () => { - document.title = this.$title - document.documentElement.lang = this.$lang - const userMeta = this.$page.frontmatter.meta || [] - const meta = userMeta.slice(0) - const useGlobalDescription = userMeta.filter(m => m.name === 'description').length === 0 - - // #665 Avoid duplicate description meta at runtime. - if (useGlobalDescription) { - meta.push({ name: 'description', content: this.$description }) - } - - // Including description meta coming from SSR. - const descriptionMetas = document.querySelectorAll('meta[name="description"]') - if (descriptionMetas.length) { - descriptionMetas.forEach(m => this.currentMetaTags.add(m)) - } - - this.currentMetaTags = new Set(updateMetaTags(meta, this.currentMetaTags)) - } - this.$watch('$page', updateMeta) - updateMeta() - }, - - beforeDestroy () { - updateMetaTags(null, this.currentMetaTags) - } -} - -function updateMetaTags (meta, current) { - if (current) { - [...current].forEach(c => { - document.head.removeChild(c) - }) - } - if (meta) { - return meta.map(m => { - const tag = document.createElement('meta') - Object.keys(m).forEach(key => { - tag.setAttribute(key, m[key]) - }) - document.head.appendChild(tag) - return tag - }) - } -} diff --git a/node_modules/vuepress/lib/app/serverEntry.js b/node_modules/vuepress/lib/app/serverEntry.js deleted file mode 100644 index 715fc956..00000000 --- a/node_modules/vuepress/lib/app/serverEntry.js +++ /dev/null @@ -1,14 +0,0 @@ -import { createApp } from './app' - -export default context => new Promise((resolve, reject) => { - const { app, router } = createApp() - const { url } = context - const { fullPath } = router.resolve(url).route - - if (fullPath !== url) { - return reject({ url: fullPath }) - } - - router.push(url) - router.onReady(() => resolve(app)) -}) diff --git a/node_modules/vuepress/lib/app/store.js b/node_modules/vuepress/lib/app/store.js deleted file mode 100644 index 115fe0b9..00000000 --- a/node_modules/vuepress/lib/app/store.js +++ /dev/null @@ -1,7 +0,0 @@ -// It is not yet time to use Vuex to manage the global state -// singleton object as a global store. -const state = { - disableScrollBehavior: false -} - -export default state diff --git a/node_modules/vuepress/lib/app/util.js b/node_modules/vuepress/lib/app/util.js deleted file mode 100644 index c1117224..00000000 --- a/node_modules/vuepress/lib/app/util.js +++ /dev/null @@ -1,19 +0,0 @@ -export function injectMixins (options, mixins) { - if (!options.mixins) { - options.mixins = [] - } - options.mixins.push(...mixins) -} - -export function findPageForPath (pages, path) { - for (let i = 0; i < pages.length; i++) { - const page = pages[i] - if (page.path === path) { - return page - } - } - return { - path: '', - frontmatter: {} - } -} |
