-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
656332e
commit d842231
Showing
44 changed files
with
4,092 additions
and
71 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
packages: | ||
- 'website' | ||
- 'packages/*' | ||
- 'scripts/*' | ||
- 'e2e/**' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-present Bytedance, Inc. and its affiliates. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Rslib Website | ||
|
||
This website is built with [Rspress](https://github.com/web-infra-dev/rspress), the document content can be written using markdown or mdx syntax. You can refer to the [Rspress Website](https://rspress.dev/) for detailed usage. | ||
|
||
## Contributing | ||
|
||
Currently Rslib provides documentation in English and Chinese. If you can use Chinese, please update both documents at the same time. Otherwise, just update the English documentation. | ||
|
||
### Image Assets | ||
|
||
For images you use in the document, it's better to upload them to the [rspack-contrib/rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources) repository, so the size of the current repository doesn't get too big. | ||
|
||
After you upload the images there, they will be automatically deployed under the <https://assets.rspack.dev/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"text": "Guide", | ||
"link": "/guide/start/", | ||
"activeMatch": "/guide/" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"type": "dir", | ||
"name": "start", | ||
"label": "Getting Started" | ||
}, | ||
{ | ||
"type": "dir", | ||
"name": "basic", | ||
"label": "Basic" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["configure-rslib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Configure Rslib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["index", "quick-start", "features"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Features | ||
|
||
Here are all the main features supported by Rslib. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Introduction | ||
|
||
## 🔥 Features | ||
|
||
## 🎯 Ecosystem | ||
|
||
Rslib is implemented based on Rsbuild and fully reuses the capabilities and ecology of Rsbuild. | ||
|
||
The following diagram illustrates the relationship between Rsbuild and other tools in the ecosystem: | ||
|
||
![Rspack stack layers](https://assets.rspack.dev/rsbuild/assets/rspack-stack-layers.png) | ||
|
||
## 🦀 Links | ||
|
||
- [Rspack](https://github.com/web-infra-dev/rspack): A fast Rust-based web bundler. | ||
- [Rsbuild](https://github.com/web-infra-dev/rsbuild): A Rspack Powered Build Tool. | ||
- [Rspress](https://github.com/web-infra-dev/rspress): A fast static site generator based on Rsbuild. | ||
- [Rsdoctor](https://github.com/web-infra-dev/rsdoctor): A one-stop build analyzer for Rspack and webpack. | ||
- [Modern.js](https://github.com/web-infra-dev/modern.js): A progressive React framework based on Rsbuild. | ||
- [awesome-rspack](https://github.com/web-infra-dev/awesome-rspack): A curated list of awesome things related to Rspack and Rsbuild. | ||
- [rspack-examples](https://github.com/rspack-contrib/rspack-examples): Examples for Rspack, Rsbuild, Rspress and Rsdoctor. | ||
- [storybook-rsbuild](https://github.com/rspack-contrib/storybook-rsbuild): Storybook builder powered by Rsbuild. | ||
- [rsbuild-plugin-template](https://github.com/rspack-contrib/rsbuild-plugin-template): Use this template to create your own Rsbuild plugin. | ||
- [rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources): Design resources for Rspack, Rsbuild, Rspress and Rsdoctor. | ||
|
||
## 🧑💻 Community | ||
|
||
Come and chat with us on [Discord](https://discord.gg/XsaKEEk4mW)! The Rspack / Rsbuild / Rslib team and users are active there, and we're always looking for contributions. | ||
|
||
## ✨ Next Step | ||
|
||
You may want: | ||
|
||
import NextSteps from '@components/NextSteps'; | ||
import Step from '@components/Step'; | ||
|
||
<NextSteps> | ||
<Step | ||
href="/guide/start/quick-start" | ||
title="Quick Start" | ||
description="Learn how to use Rslib" | ||
/> | ||
<Step | ||
href="/guide/start/features" | ||
title="All Features" | ||
description="Learn all features of Rslib" | ||
/> | ||
<Step | ||
href="/guide/basic/configure-rslib" | ||
title="Config" | ||
description="Learn how to configure Rslib" | ||
/> | ||
</NextSteps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Quick Start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
pageType: home | ||
titleSuffix: ' - Rsbuild-based library build tool' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[[redirects]] | ||
from = "/*" | ||
to = "/404.html" | ||
status = 404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"text": "指南", | ||
"link": "/guide/start/", | ||
"activeMatch": "/guide/" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"type": "dir", | ||
"name": "start", | ||
"label": "开始" | ||
}, | ||
{ | ||
"type": "dir", | ||
"name": "basic", | ||
"label": "基础" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["configure-rslib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# 配置 Rslib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["index", "quick-start", "features"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 功能导航 | ||
|
||
在这里,你可以了解到 Rslib 支持的主要功能。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# 介绍 | ||
|
||
## 🔥 特性 | ||
|
||
## 🎯 生态 | ||
|
||
Rslib 基于 Rsbuild 实现,充分复用了 Rsbuild 的能力和生态。 | ||
|
||
下图说明了 Rslib 与生态中其他工具之间的关系: | ||
|
||
![Rspack stack layers](https://assets.rspack.dev/rsbuild/assets/rspack-stack-layers.png) | ||
|
||
## 🦀 链接 | ||
|
||
- [Rspack](https://github.com/web-infra-dev/rspack):基于 Rust 的高性能打包工具。 | ||
- [Rsbuild](https://github.com/web-infra-dev/rsbuild): 由 Rspack 驱动的构建工具。 | ||
- [Rspress](https://github.com/web-infra-dev/rspress):基于 Rsbuild 的静态站点生成器。 | ||
- [Rsdoctor](https://github.com/web-infra-dev/rsdoctor):针对 Rspack 和 webpack 的一站式构建分析工具。 | ||
- [Modern.js](https://github.com/web-infra-dev/modern.js):基于 Rsbuild 的渐进式 React 框架。 | ||
- [awesome-rspack](https://github.com/web-infra-dev/awesome-rspack):与 Rspack 和 Rsbuild 相关的精彩内容列表。 | ||
- [rspack-examples](https://github.com/rspack-contrib/rspack-examples):Rspack、Rsbuild、Rspress 和 Rsdoctor 的示例项目。 | ||
- [storybook-rsbuild](https://github.com/rspack-contrib/storybook-rsbuild): 基于 Rsbuild 构建的 Storybook。 | ||
- [rsbuild-plugin-template](https://github.com/rspack-contrib/rsbuild-plugin-template):使用此模板创建你的 Rsbuild 插件。 | ||
- [rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources):Rspack、Rsbuild、Rspress 和 Rsdoctor 的设计资源。 | ||
|
||
## 🧑💻 社区 | ||
|
||
欢迎加入我们的 [Discord](https://discord.gg/XsaKEEk4mW) 交流频道!Rspack / Rsbuild / Rslib 团队和用户都在那里活跃,并且我们一直期待着各种贡献。 | ||
|
||
你也可以加入 [飞书群](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=3c3vca77-bfc0-4ef5-b62b-9c5c9c92f1b4) 与大家一起交流。 | ||
|
||
## ✨ 下一步 | ||
|
||
你可能想要: | ||
|
||
import NextSteps from '@components/NextSteps'; | ||
import Step from '@components/Step'; | ||
|
||
<NextSteps> | ||
<Step | ||
href="/guide/start/quick-start" | ||
title="快速上手" | ||
description="了解如何使用 Rslib" | ||
/> | ||
<Step | ||
href="/guide/start/features" | ||
title="功能导航" | ||
description="了解 Rslib 提供的所有功能" | ||
/> | ||
<Step | ||
href="/guide/basic/configure-rslib" | ||
title="查阅配置" | ||
description="了解如何配置 Rslib" | ||
/> | ||
</NextSteps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# 快速上手 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
pageType: home | ||
titleSuffix: ' - 基于 Rsbuild 的库构建工具' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module '*.mdx' { | ||
let MDXComponent: () => JSX.Element; | ||
export default MDXComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"introduction": { | ||
"en": "Introduction", | ||
"zh": "介绍" | ||
}, | ||
"quickStart": { | ||
"en": "Quick Start", | ||
"zh": "快速上手" | ||
}, | ||
"subtitle": { | ||
"en": "The Rsbuild-based Library Build Tool", | ||
"zh": "基于 Rsbuild 的库构建工具" | ||
}, | ||
"slogan": { | ||
"en": "Leverage the knowledge and ecosystem of webpack and Rspack", | ||
"zh": "复用 webpack 和 Rspack 的知识和生态" | ||
}, | ||
"toolStackTitle": { | ||
"en": "Tool Stack", | ||
"zh": "工具栈" | ||
}, | ||
"toolStackDesc": { | ||
"en": "High-performance tool stack built around Rspack to boost modern web development", | ||
"zh": "围绕 Rspack 打造的高性能工具栈,助力现代 Web 开发" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "rslib-website", | ||
"version": "0.0.1", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "rspress build", | ||
"dev": "rspress dev", | ||
"preview": "rspress preview" | ||
}, | ||
"devDependencies": { | ||
"@rsbuild/core": "1.0.1-rc.5", | ||
"@rslib/tsconfig": "workspace:*", | ||
"@rstack-dev/doc-ui": "1.4.2", | ||
"@types/node": "~18.19.39", | ||
"@types/react": "^18.3.5", | ||
"@types/react-dom": "^18.3.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"rspress": "1.29.0", | ||
"rspress-plugin-font-open-sans": "1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import path from 'node:path'; | ||
import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans'; | ||
import { defineConfig } from 'rspress/config'; | ||
|
||
export default defineConfig({ | ||
plugins: [pluginFontOpenSans()], | ||
root: path.join(__dirname, 'docs'), | ||
lang: 'en', | ||
base: '/', | ||
title: 'Rslib', | ||
icon: 'https://assets.rspack.dev/rslib/rslib-logo.png', | ||
logo: { | ||
light: 'https://assets.rspack.dev/rslib/rslib-logo.png', | ||
dark: 'https://assets.rspack.dev/rslib/rslib-logo.png', | ||
}, | ||
ssg: { | ||
strict: true, | ||
}, | ||
markdown: { | ||
checkDeadLinks: true, | ||
}, | ||
route: { | ||
cleanUrls: true, | ||
// exclude document fragments from routes | ||
exclude: ['**/zh/shared/**', '**/en/shared/**', './theme'], | ||
}, | ||
themeConfig: { | ||
footer: { | ||
message: 'Copyright © 2024 ByteDance.', | ||
}, | ||
socialLinks: [ | ||
{ | ||
icon: 'github', | ||
mode: 'link', | ||
content: 'https://github.com/web-infra-dev/rslib', | ||
}, | ||
{ | ||
icon: 'x', | ||
mode: 'link', | ||
content: 'https://twitter.com/rspack_dev', | ||
}, | ||
{ | ||
icon: 'discord', | ||
mode: 'link', | ||
content: 'https://discord.gg/XsaKEEk4mW', | ||
}, | ||
], | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
label: 'English', | ||
title: 'Rslib', | ||
description: 'The Rsbuild-based library build tool', | ||
editLink: { | ||
docRepoBaseUrl: | ||
'https://github.com/web-infra-dev/rslib/tree/main/website/docs', | ||
text: '📝 Edit this page on GitHub', | ||
}, | ||
}, | ||
{ | ||
lang: 'zh', | ||
label: '简体中文', | ||
title: 'Rslib', | ||
outlineTitle: '目录', | ||
prevPageText: '上一页', | ||
nextPageText: '下一页', | ||
description: '基于 Rsbuild 的库构建工具', | ||
editLink: { | ||
docRepoBaseUrl: | ||
'https://github.com/web-infra-dev/rslib/tree/main/website/docs', | ||
text: '📝 在 GitHub 上编辑此页', | ||
}, | ||
}, | ||
], | ||
}, | ||
builderConfig: { | ||
dev: { | ||
lazyCompilation: true, | ||
}, | ||
source: { | ||
alias: { | ||
'@components': path.join(__dirname, '@components'), | ||
'@en': path.join(__dirname, 'docs/en'), | ||
'@zh': path.join(__dirname, 'docs/zh'), | ||
}, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.