Skip to content

Commit a99167c

Browse files
committed
chore: update playground
1 parent ea5df68 commit a99167c

File tree

10 files changed

+57
-36
lines changed

10 files changed

+57
-36
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ test-results
1313
!.vscode/settings.json
1414
!.vscode/extensions.json
1515
.idea
16+
17+
# Ignore auto generated CSS declarations
18+
*.module.css.d.ts
19+
*.module.sass.d.ts
20+
*.module.scss.d.ts
21+
*.module.less.d.ts
22+
*.module.styl.d.ts
23+
*.module.stylus.d.ts

playground/rsbuild.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import { defineConfig } from '@rsbuild/core';
2-
import { pluginTypedCSSModules } from '../src';
2+
import { pluginLess } from '@rsbuild/plugin-less';
3+
import { pluginSass } from '@rsbuild/plugin-sass';
4+
import { pluginStylus } from '@rsbuild/plugin-stylus';
5+
import { pluginTypedCSSModules } from '../dist';
36

47
export default defineConfig({
5-
plugins: [pluginTypedCSSModules()],
8+
plugins: [
9+
pluginLess(),
10+
pluginSass(),
11+
pluginStylus(),
12+
pluginTypedCSSModules(),
13+
],
614
});

playground/src/a.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.the-a-class {
2+
color: red;
3+
}

playground/src/a.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.a {
2+
font-size: 14px;
3+
}

playground/src/b.module.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@value primary: blue;
2+
3+
.btn {
4+
padding: 20px;
5+
border: 1px solid #000;
6+
}
7+
8+
.the-b-class {
9+
composes: btn;
10+
composes: a from './a.module.scss';
11+
color: primary;
12+
}
13+
14+
.default {
15+
color: red;
16+
}
17+
18+
._underline {
19+
color: blue;
20+
}

playground/src/c.module.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.the-c-class {
2+
color: yellow;
3+
}

playground/src/d.global.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.the-d-class {
2+
color: green;
3+
}

playground/src/e.module.styl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.title-class
2+
font-size: 14px;

playground/src/index.css

Lines changed: 0 additions & 26 deletions
This file was deleted.

playground/src/index.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import './index.css';
2-
3-
document.querySelector('#root').innerHTML = `
4-
<div class="content">
5-
<h1>Vanilla Rsbuild</h1>
6-
<p>Start building amazing things with Rsbuild.</p>
7-
</div>
8-
`;
1+
import './a.css';
2+
import './b.module.scss';
3+
import './c.module.less';
4+
import './d.global.less';
5+
import './e.module.styl';

0 commit comments

Comments
 (0)