feat: temparily save
This commit is contained in:
13
apps/playground/.gitignore
vendored
Normal file
13
apps/playground/.gitignore
vendored
Normal 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
29
apps/playground/README.md
Normal 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
|
||||
```
|
||||
19
apps/playground/package.json
Normal file
19
apps/playground/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
0
apps/playground/public/.gitkeep
Normal file
0
apps/playground/public/.gitkeep
Normal file
12
apps/playground/rsbuild.config.ts
Normal file
12
apps/playground/rsbuild.config.ts
Normal 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
1
apps/playground/src/env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="@rsbuild/core/types" />
|
||||
6
apps/playground/src/index.css
Normal file
6
apps/playground/src/index.css
Normal 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);
|
||||
}
|
||||
5
apps/playground/src/index.html
Normal file
5
apps/playground/src/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html>
|
||||
<head></head>
|
||||
<body>
|
||||
<my-element />
|
||||
</body>
|
||||
4
apps/playground/src/index.ts
Normal file
4
apps/playground/src/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import './index.css';
|
||||
import { MyElement } from './my-element';
|
||||
|
||||
customElements.define('my-element', MyElement);
|
||||
34
apps/playground/src/my-element.ts
Normal file
34
apps/playground/src/my-element.ts
Normal 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>
|
||||
`;
|
||||
}
|
||||
}
|
||||
15
apps/playground/src/video-pipeline-demo.ts
Normal file
15
apps/playground/src/video-pipeline-demo.ts
Normal 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>
|
||||
`;
|
||||
}
|
||||
}
|
||||
14
apps/playground/tsconfig.json
Normal file
14
apps/playground/tsconfig.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"noEmit": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user