Skip to content

Commit

Permalink
build: migrate docs and ecosystem into standalone repos
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Dec 3, 2023
1 parent 4cd54f4 commit 8c1b8da
Show file tree
Hide file tree
Showing 452 changed files with 850 additions and 32,594 deletions.
7 changes: 2 additions & 5 deletions .commitlintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ const getSubDirectories = (dir) =>
fs
.readdirSync(dir)
.filter((item) => fs.statSync(path.join(dir, item)).isDirectory())
const corePackages = getSubDirectories(path.resolve(__dirname, 'packages'))
const ecosystemPackages = getSubDirectories(
path.resolve(__dirname, 'ecosystem'),
)
const packages = getSubDirectories(path.resolve(__dirname, 'packages'))

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', [...corePackages, ...ecosystemPackages]],
'scope-enum': [2, 'always', packages],
'footer-max-line-length': [0],
},
}
17 changes: 0 additions & 17 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
module.exports = {
root: true,
extends: 'vuepress',
globals: {
__VUEPRESS_VERSION__: 'readonly',
__VUEPRESS_BASE__: 'readonly',
__VUEPRESS_DEV__: 'readonly',
__VUEPRESS_SSR__: 'readonly',
__VUE_HMR_RUNTIME__: 'readonly',
__VUE_OPTIONS_API__: 'readonly',
__VUE_PROD_DEVTOOLS__: 'readonly',
// workaround for vue3.3 slots, should be removed once eslint-plugin-vue supports this
defineSlots: 'readonly',
},
overrides: [
{
files: ['*.ts', '*.vue', '*.cts'],
Expand All @@ -25,12 +14,6 @@ module.exports = {
'vue/multi-word-component-names': 'off',
},
},
{
files: ['**/client/config.ts'],
rules: {
'vue/match-component-file-name': 'off',
},
},
{
files: ['**/tests/**/*.ts', 'tsup.config.ts'],
rules: {
Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/check-docs.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/docs.yml

This file was deleted.

16 changes: 5 additions & 11 deletions docs/contributing.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar: auto
---

# Contributing Guide

## Overview
Expand All @@ -19,13 +15,11 @@ In the `packages` directory:
- `shared`: Utilities that shared between node side and client side.
- `utils`: Utilities that should only be used in node side.

In the `ecosystem` directory:
Here are some wrapper packages that use the above packages:

- `plugin-${name}`: Official plugins.
- `theme-default`: The default theme.
- `vuepress`: A wrapper of `vuepress-vite`.
- `vuepress-vite`: A wrapper of `@vuepress/cli` + `@vuepress/bundler-vite` + `@vuepress/theme-default`. If users want to use default theme with vite, they can simply install this package.
- `vuepress-webpack`: A wrapper of `@vuepress/cli` + `@vuepress/bundler-webpack` + `@vuepress/theme-default`. If users want to use default theme with webpack, they can simply install this package.
- `vuepress-vite`: A wrapper of `@vuepress/cli` + `@vuepress/bundler-vite`. If users want to use vite, they can simply install this package.
- `vuepress-webpack`: A wrapper of `@vuepress/cli` + `@vuepress/bundler-webpack`. If users want to use webpack, they can simply install this package.

## Development Setup

Expand Down Expand Up @@ -62,9 +56,9 @@ Main tools that used in this project:

### `pnpm build`

The `build` script uses `tsc` and `tsup` to compile TypeScript source files to JavaScript dist files.
The `build` script uses `tsup` to compile TypeScript source files to JavaScript dist files.

Also, it will copy necessary resources from source directory to dist directory, because some source files (e.g. `.vue`, `.css` files) would not be processed by `tsc` nor `tsup`, but should keep the same relative path in the dist directory.
Also, it will copy necessary resources from source directory to dist directory, because some source files (e.g. `.vue`, `.css` files) would not be processed by `tsup`, but should keep the same relative path in the dist directory.

You may need to run this script first after your clone this repository, because the dist files are ignored by `.gitignore`.

Expand Down
16 changes: 5 additions & 11 deletions docs/zh/contributing.md → CONTRIBUTING_zh.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
sidebar: auto
---

# 贡献指南

## 概览
Expand All @@ -19,13 +15,11 @@ sidebar: auto
- `shared`: 既可以在 Node 端使用、也可以在客户端使用的工具函数模块。
- `utils`: 仅可以在 Node 端使用的工具函数模块。

`ecosystem` 目录下
还有一些对上述 Package 进行封装后的 Package

- `plugin-${name}`: 官方插件。
- `theme-default`: 默认主题。
- `vuepress`: 是 `vuepress-vite` 的封装。
- `vuepress-vite`: 是 `@vuepress/cli` + `@vuepress/bundler-vite` + `@vuepress/theme-default` 的封装。如果用户想使用 默认主题 + Vite ,仅安装这个 Package 就可以了。
- `vuepress-webpack`: 是 `@vuepress/cli` + `@vuepress/bundler-webpack` + `@vuepress/theme-default` 的封装。如果用户想使用 默认主题 + Webpack ,仅安装这个 Package 就可以了。
- `vuepress-vite`: 是 `@vuepress/cli` + `@vuepress/bundler-vite` 的封装。如果用户想使用 Vite ,仅安装这个 Package 就可以了。
- `vuepress-webpack`: 是 `@vuepress/cli` + `@vuepress/bundler-webpack` 的封装。如果用户想使用 Webpack ,仅安装这个 Package 就可以了。

## 开发配置

Expand Down Expand Up @@ -62,9 +56,9 @@ pnpm docs:dev

### `pnpm build`

`build` 命令会使用 `tsc``tsup` 将 TypeScript 源文件编译为 JavaScript 文件。
`build` 命令会使用 `tsup` 将 TypeScript 源文件编译为 JavaScript 文件。

此外,它还会将必要的资源文件从源文件目录复制到输出目录。这是因为一些资源文件不会被 `tsc``tsup` 处理,但它们仍需要被放置到输出目录,并保持它们的项目对路径不变。
此外,它还会将必要的资源文件从源文件目录复制到输出目录。这是因为一些资源文件不会被 `tsup` 处理,但它们仍需要被放置到输出目录,并保持它们的项目对路径不变。

你在克隆代码仓库后,可能需要先执行该命令来确保项目代码可以顺利运行,因为编译后的输出目录被 `.gitignore` 排除在仓库以外了。

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-present, Yuxi (Evan) You
Copyright (c) 2018-present, VuePress Community

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
49 changes: 0 additions & 49 deletions docs/.vuepress/components/NpmBadge.vue

This file was deleted.

Loading

0 comments on commit 8c1b8da

Please sign in to comment.