diff --git a/.gitignore b/.gitignore index 0c20fb9..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -node_modules/ -yarn.lock -.DS_Store -package-lock.json +node_modules diff --git a/example/docs/.vuepress/config.js b/example/docs/.vuepress/config.js index 82fc08d..d398a37 100644 --- a/example/docs/.vuepress/config.js +++ b/example/docs/.vuepress/config.js @@ -7,7 +7,7 @@ module.exports = { ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }] ], // theme: 'reco', - theme: require.resolve('../../../'), + theme: require.resolve('../../../packages/vuepress-theme-reco'), themeConfig: { nav: [ { text: 'Home', link: '/', icon: 'reco-home' }, diff --git a/lerna.json b/lerna.json new file mode 100644 index 0000000..2c786e6 --- /dev/null +++ b/lerna.json @@ -0,0 +1,8 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0", + "npmClient": "yarn", + "useWorkspaces": true +} diff --git a/locals/ja.js b/locals/ja.js deleted file mode 100644 index 54ebf53..0000000 --- a/locals/ja.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - homeBlog: { - article: '記事', - tag: 'タグ', - category: 'カテゴリー', - friendLink: 'お友達リンク' - } -} diff --git a/package.json b/package.json index cace820..7885a9b 100644 --- a/package.json +++ b/package.json @@ -1,49 +1,29 @@ { "name": "vuepress-theme-reco", - "version": "1.3.3-alpha.1", - "description": "A simple and beautiful vuepress Blog & Doc theme.", + "version": "1.3.3", + "private": true, "main": "index.js", + "license": "MIT", "scripts": { + "lerna": "lerna", "dev": "vuepress dev example/docs", "build": "vuepress build example/docs", "eslint-ext": "eslint --ext .js,.vue ./", - "eslint-fix": "eslint --fix --ext .js,.vue ./" + "eslint-fix": "eslint --fix --ext .js,.vue ./", + "version": "lerna version --conventional-commits" }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuepress-reco/vuepress-theme-reco.git" - }, - "keywords": [ - "vuepress", - "vue", - "theme" + "workspaces": [ + "packages/vuepress-theme-reco", + "packages/@vuepress-reco/*" ], - "author": "reco_luan", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuepress-reco/vuepress-theme-reco/issues" - }, - "homepage": "https://vuepress-theme-reco.recoluan.com", - "_from": "vuepress-theme-reco@0.2.1", - "_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz", - "dependencies": { - "@vuepress-reco/vuepress-plugin-back-to-top": "1.0.8", - "@vuepress-reco/vuepress-plugin-extract-code": "1.0.3", - "@vuepress-reco/vuepress-plugin-loading-page": "1.0.5", - "@vuepress-reco/vuepress-plugin-pagation": "1.0.6", - "@vuepress-reco/vuepress-plugin-comments": "1.0.14", - "@vuepress/plugin-medium-zoom": "1.2.0", - "@vuepress/plugin-blog": "1.3.0", - "docsearch.js": "2.5.2", - "leancloud-storage": "3.13.2", - "valine": "1.3.6", - "vue-click-outside": "1.0.7", - "md5": "2.2.1" - }, "devDependencies": { - "babel-eslint": "10.0.3", - "eslint": "6.4.0", - "eslint-plugin-vue": "5.2.3", - "vuepress": "1.2.0" + "babel-eslint": "^10.1.0", + "eslint": "^6.8.0", + "eslint-plugin-vue": "^6.2.2", + "lerna": "^3.20.2", + "vuepress": "^1.4.0" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/README.md b/packages/@vuepress-reco/vuepress-plugin-loading/README.md new file mode 100644 index 0000000..af0d6f1 --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/README.md @@ -0,0 +1,12 @@ +# @vuepress-reco/vuepress-plugin-loading-page + +## Details + +> Loading page plugin for vuepress-theme-reco or other vuepress theme. + +|使用位置|值| +|-|-| +|plugin name|@vuepress-reco/vuepress-plugin-loading-page| +|component name|LoadingPage(主题开发时使用)| + + diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/__tests__/vuepress-plugin-loading.test.js b/packages/@vuepress-reco/vuepress-plugin-loading/__tests__/vuepress-plugin-loading.test.js new file mode 100644 index 0000000..8541b12 --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/__tests__/vuepress-plugin-loading.test.js @@ -0,0 +1,7 @@ +'use strict'; + +const vuepressPluginLoading = require('..'); + +describe('@vuepress-reco/vuepress-plugin-loading', () => { + it('needs tests'); +}); diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/bin/LoadingPage.vue b/packages/@vuepress-reco/vuepress-plugin-loading/bin/LoadingPage.vue new file mode 100644 index 0000000..05d5b8f --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/bin/LoadingPage.vue @@ -0,0 +1,91 @@ + + + diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/bin/enhanceAppFile.js b/packages/@vuepress-reco/vuepress-plugin-loading/bin/enhanceAppFile.js new file mode 100644 index 0000000..6b44525 --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/bin/enhanceAppFile.js @@ -0,0 +1,5 @@ +import LoadingPage from './LoadingPage.vue' + +export default ({ Vue }) => { + Vue.component('LoadingPage', LoadingPage) +} \ No newline at end of file diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/index.js b/packages/@vuepress-reco/vuepress-plugin-loading/index.js new file mode 100644 index 0000000..f03ee28 --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/index.js @@ -0,0 +1,8 @@ +const { path } = require('@vuepress/shared-utils') + +module.exports = (options, context) => ({ + name: '@vuepress-reco/vuepress-plugin-loading-page', + enhanceAppFiles: [ + path.resolve(__dirname, './bin/enhanceAppFile.js') + ] +}) \ No newline at end of file diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/lib/vuepress-plugin-loading.js b/packages/@vuepress-reco/vuepress-plugin-loading/lib/vuepress-plugin-loading.js new file mode 100644 index 0000000..e7a4c62 --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/lib/vuepress-plugin-loading.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = vuepressPluginLoading; + +function vuepressPluginLoading() { + // TODO +} diff --git a/packages/@vuepress-reco/vuepress-plugin-loading/package.json b/packages/@vuepress-reco/vuepress-plugin-loading/package.json new file mode 100644 index 0000000..5716fce --- /dev/null +++ b/packages/@vuepress-reco/vuepress-plugin-loading/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vuepress-reco/vuepress-plugin-loading-page", + "version": "1.0.4", + "description": "Loading page plugin for vuepress-theme-reco or other vuepress theme", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/vuepress-reco/vuepress-plugin-loading-page.git" + }, + "keywords": [ + "vuepress-theme-reco", + "loading-page", + "vuepress" + ], + "author": "reco_luan ", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuepress-reco/vuepress-plugin-loading-page/issues" + }, + "homepage": "https://vuepress-theme-reco.recoluan.com" +} diff --git a/README.md b/packages/vuepress-theme-reco/README.md similarity index 100% rename from README.md rename to packages/vuepress-theme-reco/README.md diff --git a/packages/vuepress-theme-reco/__tests__/vuepress-theme-reco.test.js b/packages/vuepress-theme-reco/__tests__/vuepress-theme-reco.test.js new file mode 100644 index 0000000..eb8810e --- /dev/null +++ b/packages/vuepress-theme-reco/__tests__/vuepress-theme-reco.test.js @@ -0,0 +1,7 @@ +'use strict'; + +const vuepressThemeReco = require('..'); + +describe('vuepress-theme-reco', () => { + it('needs tests'); +}); diff --git a/components/AlgoliaSearchBox.vue b/packages/vuepress-theme-reco/components/AlgoliaSearchBox.vue similarity index 100% rename from components/AlgoliaSearchBox.vue rename to packages/vuepress-theme-reco/components/AlgoliaSearchBox.vue diff --git a/components/Common.vue b/packages/vuepress-theme-reco/components/Common.vue similarity index 100% rename from components/Common.vue rename to packages/vuepress-theme-reco/components/Common.vue diff --git a/components/DropdownLink.vue b/packages/vuepress-theme-reco/components/DropdownLink.vue similarity index 100% rename from components/DropdownLink.vue rename to packages/vuepress-theme-reco/components/DropdownLink.vue diff --git a/components/DropdownTransition.vue b/packages/vuepress-theme-reco/components/DropdownTransition.vue similarity index 100% rename from components/DropdownTransition.vue rename to packages/vuepress-theme-reco/components/DropdownTransition.vue diff --git a/components/Footer.vue b/packages/vuepress-theme-reco/components/Footer.vue similarity index 94% rename from components/Footer.vue rename to packages/vuepress-theme-reco/components/Footer.vue index 3ad6742..1c18d19 100644 --- a/components/Footer.vue +++ b/packages/vuepress-theme-reco/components/Footer.vue @@ -13,7 +13,7 @@ {{ $themeConfig.author || $site.title }}    - {{ $themeConfig.startYear }} - + {{ $themeConfig.startYear }} - {{ year }} diff --git a/components/FriendLink.vue b/packages/vuepress-theme-reco/components/FriendLink.vue similarity index 100% rename from components/FriendLink.vue rename to packages/vuepress-theme-reco/components/FriendLink.vue diff --git a/components/Home.vue b/packages/vuepress-theme-reco/components/Home.vue similarity index 100% rename from components/Home.vue rename to packages/vuepress-theme-reco/components/Home.vue diff --git a/components/HomeBlog.vue b/packages/vuepress-theme-reco/components/HomeBlog.vue similarity index 100% rename from components/HomeBlog.vue rename to packages/vuepress-theme-reco/components/HomeBlog.vue diff --git a/components/MobShare.vue b/packages/vuepress-theme-reco/components/MobShare.vue similarity index 100% rename from components/MobShare.vue rename to packages/vuepress-theme-reco/components/MobShare.vue diff --git a/components/Mode/ModePicker.vue b/packages/vuepress-theme-reco/components/Mode/ModePicker.vue similarity index 77% rename from components/Mode/ModePicker.vue rename to packages/vuepress-theme-reco/components/Mode/ModePicker.vue index f2a5fc9..b9602dc 100644 --- a/components/Mode/ModePicker.vue +++ b/packages/vuepress-theme-reco/components/Mode/ModePicker.vue @@ -6,14 +6,14 @@ v-for="(mode, index) in modeOptions" :key="index" :class="getClass(mode.mode)" - @click="selectMode(mode.mode)" + @click="selectMode(mode)" >{{ mode.title }}