Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into auto-sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
nruffing committed Jan 28, 2024
2 parents 6b89a01 + bbaee39 commit fd793f0
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 38 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ module.exports = {
extends: 'plugin:cypress/recommended',
},
{
files: ['tools/create-helper/**/*.ts', 'tools/create-helper/**/*.vue'],
files: ['tools/create-vuepress/**/*.vue'],
rules: {
'import/no-extraneous-dependencies': 'off',
'import/named': 'off',
'vue/no-v-html': 'off',
},
},
{
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-active-header-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-active-header-links"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-back-to-top/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-back-to-top"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-container"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-docsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-docsearch"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-external-link-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-external-link-icon"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-git"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-google-analytics"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-medium-zoom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-medium-zoom"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-nprogress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-nprogress"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-palette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-palette"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-prismjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-prismjs"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-pwa-popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-pwa-popup"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-pwa"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-register-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-register-components"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-search"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-shiki"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-theme-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-theme-data"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion plugins/plugin-toc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "plugins/plugin-toc"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion themes/theme-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "themes/theme-default"
},
"license": "MIT",
"author": "meteorlxy",
Expand Down
3 changes: 2 additions & 1 deletion tools/create-vuepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuepress/ecosystem.git"
"url": "git+https://github.com/vuepress/ecosystem.git",
"directory": "tools/create-vuepress"
},
"license": "MIT",
"author": {
Expand Down
13 changes: 3 additions & 10 deletions tools/create-vuepress/src/flow/createPackageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ export const createPackageJson = async ({
bundler,
}: CreatePackageJsonOptions): Promise<void> => {
const packageJsonPath = join(targetDir, 'package.json')
// TODO: Update it
const devDependencies = {
'@vuepress/client': '^2.0.0-rc.2',
[`@vuepress/bundler-${bundler}`]: '^2.0.0-rc.2',
'@vuepress/theme-default': '^2.0.0-rc.2',
'vue': '^3.4.0',
'vuepress': '^2.0.0-rc.2',
}

if (preset === 'blog') {
devDependencies['@vuepress/core'] = '^2.0.0-rc.2'
devDependencies['vue-router'] = '^4.2.5'
}

Expand Down Expand Up @@ -86,13 +83,9 @@ export const createPackageJson = async ({
...result,
type: 'module',
scripts: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'docs:build': `vuepress build src`,
// eslint-disable-next-line @typescript-eslint/naming-convention
'docs:clean-dev': `vuepress dev src --clean-cache`,
// eslint-disable-next-line @typescript-eslint/naming-convention
'docs:dev': `vuepress dev src`,
// eslint-disable-next-line @typescript-eslint/naming-convention
'docs:build': `vuepress build docs`,
'docs:clean-dev': `vuepress dev docs --clean-cache`,
'docs:dev': `vuepress dev docs`,
'docs:update-package': `${
packageManager === 'npm' ? 'npx' : `${packageManager} dlx`
} vp-update`,
Expand Down
8 changes: 4 additions & 4 deletions tools/create-vuepress/src/flow/generateTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ${
NODE_OPTIONS: --max_old_space_size=8192
run: |-
${packageManager} run docs:build
> src/.vuepress/dist/.nojekyll
> docs/.vuepress/dist/.nojekyll
- name: ${lang === '简体中文' ? '部署文档' : 'Deploy Docs'}
uses: JamesIves/github-pages-deploy-action@v4
Expand All @@ -94,7 +94,7 @@ ${
: 'This is the branch where the docs are deployed to'
}
branch: gh-pages
folder: src/.vuepress/dist
folder: docs/.vuepress/dist
`

interface GenerateTemplateOptions {
Expand Down Expand Up @@ -128,9 +128,9 @@ export const generateTemplate = async ({
console.log(locale.flow.generateTemplate)

// copy template
copy(join(templateFolder, preset), join(targetDirPath, 'src'))
copy(join(templateFolder, preset), join(targetDirPath, 'docs'))

const configFilePath = join(targetDirPath, 'src/.vuepress/config.js')
const configFilePath = join(targetDirPath, 'docs/.vuepress/config.js')

const content = readFileSync(configFilePath, { encoding: 'utf-8' })

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPage } from '@vuepress/core'
import { createPage } from 'vuepress/core'

const slugify = (name) =>
name
Expand Down

0 comments on commit fd793f0

Please sign in to comment.