提交 78925562 编写于 作者: U ULIVZ

feat: init monorepo

上级 7ae2b31a
{
"lerna": "2.5.1",
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.0.0"
}
{
"name": "vuepress",
"version": "0.14.1",
"private": true,
"workspaces": [
"packages/@vuepress/*",
"packages/vuepress",
"packages/docs"
],
"description": "Minimalistic doc generator with Vue component based layout system",
"main": "lib/index.js",
"bin": {
"vuepress": "bin/vuepress.js"
},
"scripts": {
"dev": "node bin/vuepress dev docs",
"build": "node bin/vuepress build docs",
"lint": "eslint --fix --ext .js,.vue bin/ lib/ test/",
"boot": "node scripts/bootstrap.js",
"dev": "lerna run --scope docs dev",
"build": "lerna run --scope docs build",
"lint": "eslint --fix packages/**/*.js packages/**/*.vue packages/**/bin/*",
"prepublishOnly": "conventional-changelog -p angular -r 2 -i CHANGELOG.md -s",
"release": "/bin/bash scripts/release.sh",
"test": "node test/prepare.js && jest --config test/jest.config.js"
......@@ -38,64 +43,6 @@
"git add"
]
},
"dependencies": {
"@babel/core": "7.0.0-beta.47",
"@vue/babel-preset-app": "3.0.0-beta.11",
"autoprefixer": "^8.2.0",
"babel-loader": "8.0.0-beta.3",
"cache-loader": "^1.2.2",
"chalk": "^2.3.2",
"chokidar": "^2.0.3",
"commander": "^2.15.1",
"connect-history-api-fallback": "^1.5.0",
"copy-webpack-plugin": "^4.5.1",
"cross-spawn": "^6.0.5",
"css-loader": "^0.28.11",
"diacritics": "^1.3.0",
"docsearch.js": "^2.5.2",
"escape-html": "^1.0.3",
"file-loader": "^1.1.11",
"fs-extra": "^5.0.0",
"globby": "^8.0.1",
"gray-matter": "^4.0.1",
"js-yaml": "^3.11.0",
"koa-connect": "^2.0.1",
"koa-mount": "^3.0.0",
"koa-range": "^0.3.0",
"koa-static": "^4.0.2",
"loader-utils": "^1.1.0",
"lodash.throttle": "^4.1.1",
"lru-cache": "^4.1.2",
"markdown-it": "^8.4.1",
"markdown-it-anchor": "^5.0.2",
"markdown-it-container": "^2.0.0",
"markdown-it-emoji": "^1.4.0",
"markdown-it-table-of-contents": "^0.4.0",
"mini-css-extract-plugin": "^0.4.1",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^4.0.0",
"portfinder": "^1.0.13",
"postcss-loader": "^2.1.5",
"prismjs": "^1.13.0",
"register-service-worker": "^1.4.1",
"semver": "^5.5.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"toml": "^2.3.3",
"url-loader": "^1.0.1",
"vue": "^2.5.16",
"vue-loader": "^15.2.4",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vuepress-html-webpack-plugin": "^3.2.0",
"webpack": "^4.8.1",
"webpack-chain": "^4.6.0",
"webpack-merge": "^4.1.2",
"webpack-serve": "^1.0.2",
"webpackbar": "^2.6.1",
"workbox-build": "^3.1.0"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.16",
"babel-core": "^7.0.0-0",
......@@ -106,6 +53,7 @@
"eslint-plugin-vue-libs": "^3.0.0",
"jest": "^23.0.0",
"jest-serializer-vue": "^1.0.0",
"lerna": "^2.11.0",
"lint-staged": "^7.0.4",
"vue-jest": "^2.6.0",
"vuepress-theme-vue": "^1.1.0",
......
__tests__
__mocks__
\ No newline at end of file
# @vuepress/core
> core for vuepress
``` bash
cd packages/@vuepress/core
yarn link
```
\ No newline at end of file
......@@ -33,7 +33,6 @@ 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)
......
......@@ -9,11 +9,11 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
const escape = require('escape-html')
const logger = require('./util/logger')
const prepare = require('./prepare')
const prepare = require('./prepare/index')
const createClientConfig = require('./webpack/createClientConfig')
const createServerConfig = require('./webpack/createServerConfig')
const { createBundleRenderer } = require('vue-server-renderer')
const { normalizeHeadTag, applyUserWebpackConfig } = require('./util')
const { normalizeHeadTag, applyUserWebpackConfig } = require('./util/index')
logger.wait('\nExtracting site metadata...')
const options = await prepare(sourceDir, true /* isProd */)
......
......@@ -11,12 +11,12 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
const serveStatic = require('koa-static')
const history = require('connect-history-api-fallback')
const prepare = require('./prepare')
const prepare = require('./prepare/index')
const logger = require('./util/logger')
const HeadPlugin = require('./webpack/HeadPlugin')
const DevLogPlugin = require('./webpack/DevLogPlugin')
const createClientConfig = require('./webpack/createClientConfig')
const { applyUserWebpackConfig } = require('./util')
const { applyUserWebpackConfig } = require('./util/index')
const { frontmatterEmitter } = require('./webpack/markdownLoader')
logger.wait('\nExtracting site metadata...')
......
exports.dev = require('./dev')
exports.build = require('./build')
exports.eject = require('./eject')
Object.assign(exports, require('./util'))
Object.assign(exports, require('./util/index'))
......@@ -39,11 +39,11 @@ module.exports = async function prepare (sourceDir, isProd) {
await writeTemp('siteData.js', dataCode)
// 7. handle user override
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl')
const overridePath = path.resolve(sourceDir, '.vuepress/override.styl').replace(/[\\]+/g, '/')
const hasUserOverride = fs.existsSync(overridePath)
await writeTemp('override.styl', hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``)
const stylePath = path.resolve(sourceDir, '.vuepress/style.styl')
const stylePath = path.resolve(sourceDir, '.vuepress/style.styl').replace(/[\\]+/g, '/')
const hasUserStyle = fs.existsSync(stylePath)
await writeTemp('style.styl', hasUserStyle ? `@import(${JSON.stringify(stylePath)})` : ``)
......
const fs = require('fs-extra')
const path = require('path')
const globby = require('globby')
const createMarkdown = require('../markdown')
const createMarkdown = require('../markdown/index')
const loadConfig = require('./loadConfig')
const { sort } = require('./util')
......
const path = require('path')
const Plugin = require('../plugin-api')
const Plugin = require('../plugin-api/index')
const PluginContext = require('../plugin-api/context')
const lastUpdatedPlugin = require('../../packages/vuepress-plugin-last-updated')
const enhanceAppPlugin = require('../../packages/vuepress-plugin-enhance-app')
const registerGlobalComponentsPlugin = require('../../packages/vuepress-plugin-register-global-components')
const activeHeaderLinksPlugin = require('../../packages/vuepress-plugin-active-header-links')
const lastUpdatedPlugin = require('../../../plugin-last-updated/index')
const enhanceAppPlugin = require('../../../plugin-enhance-app/index')
const registerGlobalComponentsPlugin = require('../../../plugin-register-global-components/index')
const activeHeaderLinksPlugin = require('../../../plugin-active-header-links/index')
module.exports = function (options) {
const { siteConfig, themeConfig, sourceDir, themePath } = options
......
const { normalizeHeadTag } = require('../util')
const { normalizeHeadTag } = require('../util/index')
module.exports = class SiteDataPlugin {
constructor ({ tags }) {
......
......@@ -3,7 +3,7 @@ const path = require('path')
const hash = require('hash-sum')
const { EventEmitter } = require('events')
const { getOptions } = require('loader-utils')
const { inferTitle, extractHeaders, parseFrontmatter } = require('../util')
const { inferTitle, extractHeaders, parseFrontmatter } = require('../util/index')
const LRU = require('lru-cache')
const cache = LRU({ max: 1000 })
......
{
"name": "@vuepress/core",
"version": "1.0.0",
"description": "Minimalistic doc generator with Vue component based layout system",
"main": "lib/index.js",
"bin": {
"vuepress": "bin/vuepress.js"
},
"scripts": {
"lint": "eslint --fix --ext .js,.vue bin/ lib/ test/",
"prepublishOnly": "conventional-changelog -p angular -r 2 -i CHANGELOG.md -s",
"release": "/bin/bash scripts/release.sh",
"test": "node test/prepare.js && jest --config test/jest.config.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vuepress.git"
},
"keywords": [
"documentation",
"vue",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress#readme",
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"dependencies": {
"@babel/core": "7.0.0-beta.47",
"@vue/babel-preset-app": "3.0.0-beta.11",
"autoprefixer": "^8.2.0",
"babel-loader": "8.0.0-beta.3",
"cache-loader": "^1.2.2",
"chalk": "^2.3.2",
"chokidar": "^2.0.3",
"commander": "^2.15.1",
"connect-history-api-fallback": "^1.5.0",
"copy-webpack-plugin": "^4.5.1",
"cross-spawn": "^6.0.5",
"css-loader": "^0.28.11",
"diacritics": "^1.3.0",
"docsearch.js": "^2.5.2",
"escape-html": "^1.0.3",
"file-loader": "^1.1.11",
"fs-extra": "^5.0.0",
"globby": "^8.0.1",
"gray-matter": "^4.0.1",
"js-yaml": "^3.11.0",
"koa-connect": "^2.0.1",
"koa-mount": "^3.0.0",
"koa-range": "^0.3.0",
"koa-static": "^4.0.2",
"loader-utils": "^1.1.0",
"lodash.throttle": "^4.1.1",
"lru-cache": "^4.1.2",
"markdown-it": "^8.4.1",
"markdown-it-anchor": "^5.0.2",
"markdown-it-container": "^2.0.0",
"markdown-it-emoji": "^1.4.0",
"markdown-it-table-of-contents": "^0.4.0",
"mini-css-extract-plugin": "^0.4.1",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^4.0.0",
"portfinder": "^1.0.13",
"postcss-loader": "^2.1.5",
"prismjs": "^1.13.0",
"register-service-worker": "^1.4.1",
"semver": "^5.5.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"toml": "^2.3.3",
"url-loader": "^1.0.1",
"vue": "^2.5.16",
"vue-loader": "^15.2.4",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vuepress-html-webpack-plugin": "^3.2.0",
"webpack": "^4.8.1",
"webpack-chain": "^4.6.0",
"webpack-merge": "^4.1.2",
"webpack-serve": "^1.0.2",
"webpackbar": "^2.6.1",
"workbox-build": "^3.1.0"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.16",
"babel-core": "^7.0.0-0",
"babel-jest": "^23.0.0",
"conventional-changelog-cli": "^1.3.22",
"eslint": "^4.19.1",
"eslint-plugin-jest": "^21.15.1",
"eslint-plugin-vue-libs": "^3.0.0",
"jest": "^23.0.0",
"jest-serializer-vue": "^1.0.0",
"lint-staged": "^7.0.4",
"vue-jest": "^2.6.0",
"vuepress-theme-vue": "^1.1.0",
"yorkie": "^1.0.3"
},
"engines": {
"node": ">=8"
},
"browserslist": [
">1%"
]
}
interface Plugin {
name: string;
enabled: boolean;
clientRootMixin: string;
}
interface Config extends Plugin {
}
interface Theme extends Plugin {
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/plugin-active-header-links
> active-header-links plugin for vuepress
\ No newline at end of file
{
"name": "@vuepress/plugin-active-header-links",
"version": "1.0.0",
"description": "active-header-links plugin for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-cli.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-active-header-links#readme"
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/plugin-enhance-app
> enhance-app plugin for vuepress
\ No newline at end of file
{
"name": "@vuepress/plugin-enhance-app",
"version": "1.0.0",
"description": "enhance-app plugin for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-cli.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-enhance-app#readme"
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/plugin-last-updated
> last-updated plugin for vuepress
\ No newline at end of file
{
"name": "@vuepress/plugin-last-updated",
"version": "1.0.0",
"description": "last-updated plugin for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-cli.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-last-updated#readme"
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/plugin-register-global-components
> register-global-components plugin for vuepress
\ No newline at end of file
{
"name": "@vuepress/plugin-register-global-components",
"version": "1.0.0",
"description": "register-global-components plugin for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-cli.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-register-global-components#readme"
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/plugin-test
> test plugin for vuepress
\ No newline at end of file
{
"name": "@vuepress/plugin-test",
"version": "1.0.0",
"description": "test plugin for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-cli.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-test#readme"
}
\ No newline at end of file
__tests__
__mocks__
\ No newline at end of file
# @vuepress/theme-default
> theme-default for vuepress
\ No newline at end of file
export default ({ Vue }) => {
Vue.component('Badge', () => import('./components/Badge.vue'))
}
const path = require('path')
// Theme API.
module.exports = {
layout: path.resolve(__dirname, 'src/Layout.vue'),
404: path.resolve(__dirname, 'src/NotFound.vue'),
chainWebpack (config, isServer) {
},
plugins: []
}
{
"name": "@vuepress/theme-default",
"version": "1.0.0",
"description": "Default theme for VuePress",
"main": "lib/index.js",
"bin": {
"vuepress": "bin/vuepress.js"
},
"scripts": {
"boot": "node scripts/bootstrap.js",
"dev": "node bin/vuepress dev docs",
"build": "node bin/vuepress build docs",
"lint": "eslint --fix --ext .js,.vue bin/ lib/ test/",
"prepublishOnly": "conventional-changelog -p angular -r 2 -i CHANGELOG.md -s",
"release": "/bin/bash scripts/release.sh",
"test": "node test/prepare.js && jest --config test/jest.config.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vuepress.git"
},
"keywords": [
"documentation",
"vue",
"generator"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress#readme",
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"dependencies": {
"@babel/core": "7.0.0-beta.47",
"@vue/babel-preset-app": "3.0.0-beta.11",
"autoprefixer": "^8.2.0",
"babel-loader": "8.0.0-beta.3",
"cache-loader": "^1.2.2",
"chalk": "^2.3.2",
"chokidar": "^2.0.3",
"commander": "^2.15.1",
"connect-history-api-fallback": "^1.5.0",
"copy-webpack-plugin": "^4.5.1",
"cross-spawn": "^6.0.5",
"css-loader": "^0.28.11",
"diacritics": "^1.3.0",
"docsearch.js": "^2.5.2",
"escape-html": "^1.0.3",
"file-loader": "^1.1.11",
"fs-extra": "^5.0.0",
"globby": "^8.0.1",
"gray-matter": "^4.0.1",
"js-yaml": "^3.11.0",
"koa-connect": "^2.0.1",
"koa-mount": "^3.0.0",
"koa-range": "^0.3.0",
"koa-static": "^4.0.2",
"loader-utils": "^1.1.0",
"lodash.throttle": "^4.1.1",
"lru-cache": "^4.1.2",
"markdown-it": "^8.4.1",
"markdown-it-anchor": "^5.0.2",
"markdown-it-container": "^2.0.0",
"markdown-it-emoji": "^1.4.0",
"markdown-it-table-of-contents": "^0.4.0",
"mini-css-extract-plugin": "^0.4.1",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^4.0.0",
"portfinder": "^1.0.13",
"postcss-loader": "^2.1.5",
"prismjs": "^1.13.0",
"register-service-worker": "^1.4.1",
"semver": "^5.5.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"toml": "^2.3.3",
"url-loader": "^1.0.1",
"vue": "^2.5.16",
"vue-loader": "^15.2.4",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vuepress-html-webpack-plugin": "^3.2.0",
"webpack": "^4.8.1",
"webpack-chain": "^4.6.0",
"webpack-merge": "^4.1.2",
"webpack-serve": "^1.0.2",
"webpackbar": "^2.6.1",
"workbox-build": "^3.1.0"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.16",
"babel-core": "^7.0.0-0",
"babel-jest": "^23.0.0",
"conventional-changelog-cli": "^1.3.22",
"eslint": "^4.19.1",
"eslint-plugin-jest": "^21.15.1",
"eslint-plugin-vue-libs": "^3.0.0",
"jest": "^23.0.0",
"jest-serializer-vue": "^1.0.0",
"lerna": "^2.11.0",
"lint-staged": "^7.0.4",
"vue-jest": "^2.6.0",
"vuepress-theme-vue": "^1.1.0",
"yorkie": "^1.0.3"
},
"engines": {
"node": ">=8"
},
"browserslist": [
">1%"
]
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册