Skip to content

Commit

Permalink
feature: New Rsbuild configs (#217)
Browse files Browse the repository at this point in the history
* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff
  • Loading branch information
patricklafrance authored Dec 15, 2024
1 parent 2147322 commit 5cca168
Show file tree
Hide file tree
Showing 158 changed files with 6,874 additions and 530 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@sample/*"],
"ignore": ["@webpack-sample/*", "@rsbuild-sample/*", "@storybook-sample/*"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
- name: Build packages
run: pnpm build-pkg

- name: Build sample
run: pnpm build-sample
- name: Build webpack sample
run: pnpm build-webpack

- name: Test packages
run: pnpm test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
dist
storybook-static
.pnpm-debug.log*
.netlify
.turbo
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Common configurations for building web apps at [Workleap](https://workleap.com/)
| [@workleap/tsup-configs](packages/tsup-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) |
| [@workleap/swc-configs](packages/swc-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/swc-configs)](https://www.npmjs.com/package/@workleap/swc-configs) |
| [@workleap/webpack-configs](packages/webpack-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) |
| [@workleap/rsbuild-configs](packages/rsbuild-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) |

## Have a question or found an issue?

Expand Down
7 changes: 4 additions & 3 deletions docs/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ The majority of the shared tooling configurations targets [ESM](https://develope
| --- | --- | --- |
| ![](./static/browserslist.svg){ class="h-5 w-5 mr-2 -mt-1" }[Browserslist](https://browsersl.ist/) | [![npm version](https://img.shields.io/npm/v/@workleap/browserslist-config)](https://www.npmjs.com/package/@workleap/browserslist-config) | [Getting started](browserslist/default.md) |
| ![](./static/eslint.svg){ class="h-5 w-5 mr-2 -mt-1" }[ESLint](https://eslint.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/eslint-plugin)](https://www.npmjs.com/package/@workleap/eslint-plugin) | [Getting started](eslint/default.md) |
| ![](./static/postcss.svg){ class="h-5 w-5 mr-2 -mt-1" }[PostCSS](https://postcss.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/postcss-configs)](https://www.npmjs.com/package/@workleap/postcss-configs) | [Getting started](postcss/default.md) |
| ![](./static/stylelint.svg){ class="h-5 w-5 mr-2 -mt-1" }[Stylelint](https://stylelint.io/) | [![npm version](https://img.shields.io/npm/v/@workleap/stylelint-configs)](https://www.npmjs.com/package/@workleap/stylelint-configs) | [Getting started](stylelint/default.md) |
| ![](./static/typescript.svg){ class="h-5 w-5 mr-2 -mt-1" }[Typescript](https://www.typescriptlang.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/typescript-configs)](https://www.npmjs.com/package/@workleap/typescript-configs) | [Getting started](typescript/default.md) |
| ![](./static/swc.svg){ class="h-5 w-5 mr-2 -mt-1" }[SWC](https://swc.rs/) | [![npm version](https://img.shields.io/npm/v/@workleap/swc-configs)](https://www.npmjs.com/package/@workleap/swc-configs) | [Getting started](swc/default.md) |
| ![](./static/rsbuild.svg){ class="h-5 w-5 mr-2 -mt-1" }[Rsbuild](https://rsbuild.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/rsbuild-configs)](https://www.npmjs.com/package/@workleap/rsbuild-configs) | [Getting started](rsbuild/default.md) |
| ![](./static/tsup.svg){ class="h-5 w-5 mr-2 -mt-1" }[tsup](https://tsup.egoist.dev/) | [![npm version](https://img.shields.io/npm/v/@workleap/tsup-configs)](https://www.npmjs.com/package/@workleap/tsup-configs) | [Getting started](tsup/default.md) |
| ![](./static/typescript.svg){ class="h-5 w-5 mr-2 -mt-1" }[Typescript](https://www.typescriptlang.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/typescript-configs)](https://www.npmjs.com/package/@workleap/typescript-configs) | [Getting started](typescript/default.md) |
| ![](./static/webpack.svg){ class="h-5 w-5 mr-2 -mt-1" }[webpack](https://webpack.js.org/) | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | [Getting started](webpack/default.md) |
| ![](./static/postcss.svg){ class="h-5 w-5 mr-2 -mt-1" }[PostCSS](https://postcss.org/) [!badge variant="secondary" size="s" text="in maintenance"] | [![npm version](https://img.shields.io/npm/v/@workleap/postcss-configs)](https://www.npmjs.com/package/@workleap/postcss-configs) | [Getting started](postcss/default.md) |
| ![](./static/webpack.svg){ class="h-5 w-5 mr-2 -mt-1" }[webpack](https://webpack.js.org/) [!badge variant="secondary" size="s" text="in maintenance"] | [![npm version](https://img.shields.io/npm/v/@workleap/webpack-configs)](https://www.npmjs.com/package/@workleap/webpack-configs) | [Getting started](webpack/default.md) |



Expand Down
2 changes: 1 addition & 1 deletion docs/eslint/setup-monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ toc:
This monorepo setup has been tested with [PNPM workspaces](https://pnpm.io/workspaces). You may need a different setup for [NPM workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) or [Yarn workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/) because by default, those package managers **hoist dependencies** rather than installing them in isolation like PNPM.
!!!

To lint a monorepo solution (**multiple projects** per repository), [ESLint](https://eslint.org/) must be setuped to lint the files at the root of the solution (the monorepo **workspace**) and the files of every project of the monorepo. Execute the following steps to setup ESLint for a monorepo solution.
To lint a monorepo solution (**multiple projects** per repository), [ESLint](https://eslint.org/) must be setuped to lint the files at the root of the solution (the monorepo **workspace**) and the files of every project of the monorepo. Execute the following steps to setup ESLint for a monorepo solution :point_down:

## Setup the workspace

Expand Down
2 changes: 1 addition & 1 deletion docs/eslint/setup-polyrepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ toc:

# Setup a polyrepo

Execute the following steps to setup [ESLint](https://eslint.org/) for a polyrepo solution (**single project** per repository).
Execute the following steps to setup [ESLint](https://eslint.org/) for a polyrepo solution (**single project** per repository) :point_down:

## Install the packages

Expand Down
8 changes: 6 additions & 2 deletions docs/postcss/configure-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ toc:

# Configure a project

Execute the following steps to setup [PostCSS](https://postcss.org/) for a single project.
!!!warning
`@workleap/postcss-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead of [@workleap/webpack-configs](../webpack/default.md), which eliminates the need for PostCSS.
!!!

Execute the following steps to setup [PostCSS](https://postcss.org/) for a single project :point_down:

## Install the packages

Expand Down Expand Up @@ -158,7 +162,7 @@ export default defineConfig({
## Configure webpack

!!!info
If your project is using `@workleap/wepack-config`, you don't have to configure `postcss-loader` as the [defineDevConfig](../webpack/configure-dev.md#definedevconfig) and [defineBuildConfig](../webpack/configure-build.md#definebuildconfig) functions already takes care of configuring PostCSS.
If your project is using `@workleap/wepack-config`, you don't have to configure `postcss-loader` as the [defineDevConfig](../webpack/configure-dev.md#webpackdevjs) and [defineBuildConfig](../webpack/configure-build.md#webpackbuildjs) functions already takes care of configuring PostCSS.
!!!

To integrate with webpack, update your configuration file to include a [postcss-loader](https://www.npmjs.com/package/postcss-loader):
Expand Down
6 changes: 5 additions & 1 deletion docs/postcss/default.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 160
order: 100
icon: /static/postcss.svg
label: PostCSS
expanded: true
Expand All @@ -9,6 +9,10 @@ toc:

# PostCSS

!!!warning
`@workleap/postcss-configs` is now in maintenance mode. If you're starting a new project, consider using [@workleap/rsbuild-configs](../rsbuild/default.md) instead of [@workleap/webpack-configs](../webpack/default.md), which eliminates the need for PostCSS.
!!!

<!-- !!!warning Before you continue...
The preferred way for using `@workleap/postcss-configs` is **not** by installing the library manually, but rather by **scaffolding** your application with Workleap's [foundry-cli](https://github.com/gsoft-inc/wl-foundry-cli).
Expand Down
Loading

0 comments on commit 5cca168

Please sign in to comment.