feat: temparily save

This commit is contained in:
2025-03-09 02:46:15 +08:00
parent 9b310f0c62
commit 595e8d29dc
27 changed files with 1132 additions and 0 deletions

13
apps/playground/.gitignore vendored Normal file
View File

@@ -0,0 +1,13 @@
# Local
.DS_Store
*.local
*.log*
# Dist
node_modules
dist/
# IDE
.vscode/*
!.vscode/extensions.json
.idea

29
apps/playground/README.md Normal file
View File

@@ -0,0 +1,29 @@
# Rsbuild project
## Setup
Install the dependencies:
```bash
pnpm install
```
## Get started
Start the dev server:
```bash
pnpm dev
```
Build the app for production:
```bash
pnpm build
```
Preview the production build locally:
```bash
pnpm preview
```

View File

@@ -0,0 +1,19 @@
{
"name": "playground",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "rsbuild dev",
"preview": "rsbuild preview"
},
"dependencies": {
"lit": "^3.2.1",
"rxjs": "^7.8.2"
},
"devDependencies": {
"@rsbuild/core": "^1.2.14",
"typescript": "^5.8.2"
}
}

View File

View File

@@ -0,0 +1,12 @@
import { defineConfig } from '@rsbuild/core';
export default defineConfig({
html: {
template: './src/index.html',
},
source: {
decorators: {
version: 'legacy',
},
},
});

1
apps/playground/src/env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="@rsbuild/core/types" />

View File

@@ -0,0 +1,6 @@
body {
margin: 0;
color: #fff;
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
background-image: linear-gradient(to bottom, #020917, #101725);
}

View File

@@ -0,0 +1,5 @@
<!doctype html>
<head></head>
<body>
<my-element />
</body>

View File

@@ -0,0 +1,4 @@
import './index.css';
import { MyElement } from './my-element';
customElements.define('my-element', MyElement);

View File

@@ -0,0 +1,34 @@
import { html, css, LitElement } from 'lit';
export class MyElement extends LitElement {
static styles = css`
.content {
display: flex;
min-height: 100vh;
line-height: 1.1;
text-align: center;
flex-direction: column;
justify-content: center;
}
.content h1 {
font-size: 3.6rem;
font-weight: 700;
}
.content p {
font-size: 1.2rem;
font-weight: 400;
opacity: 0.5;
}
`;
render() {
return html`
<div class="content">
<h1>Rsbuild with Lit</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
`;
}
}

View File

@@ -0,0 +1,15 @@
import { html, css, LitElement } from 'lit';
export class VideoPipelineDemo extends LitElement {
static styles = css`
`;
render() {
return html`
<div class="content">
<h1>Rsbuild with Lit</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
`;
}
}

View File

@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "ES2020",
"noEmit": true,
"experimentalDecorators": true,
"module": "ESNext",
"moduleResolution": "bundler",
"useDefineForClassFields": false
},
"include": [
"src"
]
}