Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/app-react/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-vanilla/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.test({
Expand Down
2 changes: 1 addition & 1 deletion examples/documentation/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';
import path from 'node:path';

Expand Down
2 changes: 1 addition & 1 deletion examples/lib-node/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib({
Expand Down
2 changes: 1 addition & 1 deletion examples/lib-react/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/test-inline-projects/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { pluginReact } from '@rsbuild/plugin-react';
import { define } from 'rstack';

Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-app-lit/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-app-react/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-app-solid/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-app-vue/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-doc-i18n/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import path from 'node:path';
import { define } from 'rstack';

Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-doc/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import path from 'node:path';
import { define } from 'rstack';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib({
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-lib-node/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib({});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-lib-react/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-lib-solid/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';
import { svelteDtsPlugin } from './scripts/rslib-plugin-svelte-dts.ts';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-lib-vue/rstack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-nx/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lint(({ js, ts, reactPlugin, reactHooksPlugin, rstestPlugin }) => [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-pnpm/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lint(({ js, ts, reactPlugin, reactHooksPlugin, rstestPlugin }) => [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lib(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-turborepo/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.lint(({ js, ts, reactPlugin, reactHooksPlugin, rstestPlugin }) => [
Expand Down
2 changes: 1 addition & 1 deletion packages/rstack/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { withRslibConfig } from '@rstest/adapter-rslib';
import { define } from 'rstack';

Expand Down
16 changes: 8 additions & 8 deletions packages/rstack/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,31 +123,31 @@ type Define = {
* Inherits shared configs from left to right, followed by the project's own
* definitions regardless of call order. May only be called once per config load.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
extends: (configs: readonly RstackConfig[]) => void;
/**
* Defines the Rsbuild config for the app.
*
* This config is used by the `rs dev`, `rs build`, and `rs preview` commands.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
app: typeof defineAppConfig;
/**
* Defines the Rslib config for libraries.
*
* This config is used by the `rs lib` command.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
lib: typeof defineRslibConfig;
/**
* Defines the Rspress config for documentation.
*
* This config is used by the `rs doc` command.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
doc: (config: RspressConfigDefinition) => void;
/**
Expand All @@ -159,7 +159,7 @@ type Define = {
* falls back to `define.lib`. For multi-project configs, this applies to every inline
* project without an explicit `extends`. The app config takes precedence when both are defined.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
test: (config: RstestConfigExport) => void;
/**
Expand All @@ -168,23 +168,23 @@ type Define = {
* This config is used by the `rs lint` command.
* A config factory receives the exports from `rstack/lint`.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
lint: (config: RslintConfigDefinition) => void;
/**
* Defines the Prettier config for formatting.
*
* This config will be used by the `rs fmt` command.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
fmt: (config: FmtConfigDefinition) => void;
/**
* Defines the lint-staged config for staged files.
*
* This config is used by the `rs staged` command.
*
* @see {@link https://rstack.rs/config | Configuration guide}
* @see {@link https://rstack.rs/guide/configuration | Configuration guide}
*/
staged: (config: StagedConfig) => void;
};
Expand Down
2 changes: 1 addition & 1 deletion rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';
import skillsLock from './skills-lock.json' with { type: 'json' };

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rstack CLI centralizes the configuration for your project's tools in a single fi
Create `rstack.config.ts` in the project root and call the relevant `define.*()` APIs:

```ts title="rstack.config.ts"
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Rstack CLI also provides `rstack` as an alias for `rs`. For example, `pnpm rstac
Create `rstack.config.ts` in the project root and register the configurations your project needs. The following is a minimal example for an application with testing and linting:

```ts title="rstack.config.ts"
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/guide/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When using [shared configurations](./configuration#shared-configurations), Rstac

### Inherit the application configuration

When `define.app()` is registered, Rstack CLI converts it with [`@rstest/adapter-rsbuild`](https://rstest.rs/guide/integration/rsbuild) and uses the result as the test configuration's `extends` value:
When `define.app()` is registered, Rstack CLI converts it with [`@rstest/adapter-rsbuild`](https://rstest.rs/integration/rsbuild/) and uses the result as the test configuration's `extends` value:

```ts title="rstack.config.ts"
import { define } from 'rstack';
Expand All @@ -61,7 +61,7 @@ define.test({

### Inherit the library configuration

When `define.lib()` is registered, Rstack CLI converts it with [`@rstest/adapter-rslib`](https://rstest.rs/guide/integration/rslib):
When `define.lib()` is registered, Rstack CLI converts it with [`@rstest/adapter-rslib`](https://rstest.rs/integration/rslib/):

```ts title="rstack.config.ts"
import { define } from 'rstack';
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rstack CLI 将项目所用工具的配置集中到一份文件中。通过 `defi
在项目根目录创建 `rstack.config.ts`,并调用对应的 `define.*()` API:

```ts title="rstack.config.ts"
// Configuration guide: https://rstack.rs/config
// Configuration guide: https://rstack.rs/guide/configuration
import { define } from 'rstack';

define.app({
Expand Down
Loading
Loading