Move example app into a demo folder (#1280)
* Move example app into a demo folder * Move example app into a demo folder
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -21,7 +21,7 @@ body:
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Reproduction
|
||||
description: A detailed step-by-step guide on how to reproduce the issue or (preferably) a link to a repository that reproduces the issue. Reproductions must be [short, self-contained and correct](http://sscce.org/) and must not contain files or code that aren't relevant to the issue. It's best if you use the sample app in `example/index.ts` as a starting point for your reproduction. We will prioritize issues that include a working minimal reproduction repository.
|
||||
description: A detailed step-by-step guide on how to reproduce the issue or (preferably) a link to a repository that reproduces the issue. Reproductions must be [short, self-contained and correct](http://sscce.org/) and must not contain files or code that aren't relevant to the issue. It's best if you use the sample app in `examples/demo/demo.ts` as a starting point for your reproduction. We will prioritize issues that include a working minimal reproduction repository.
|
||||
placeholder: Reproduction
|
||||
validations:
|
||||
required: true
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -111,4 +111,4 @@ docs/
|
||||
|
||||
pkg/
|
||||
bin/
|
||||
example/build/
|
||||
examples/**/build/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
bin
|
||||
docs
|
||||
protocol
|
||||
example
|
||||
examples
|
||||
node_modules
|
||||
tsconfig.json
|
||||
test
|
||||
|
||||
@@ -306,9 +306,9 @@ setLogExtension((level: LogLevel, msg: string, context: object) => {
|
||||
|
||||
## Examples
|
||||
|
||||
### SDK Sample
|
||||
### Demo App
|
||||
|
||||
[example/sample.ts](example/sample.ts) contains a demo webapp that uses the SDK. Run it with `pnpm install && pnpm sample`
|
||||
[examples/demo](examples/demo/) contains a demo webapp that uses the SDK. Run it with `pnpm install && pnpm examples:demo`
|
||||
|
||||
## Browser Support
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//@ts-ignore
|
||||
import E2EEWorker from '../src/e2ee/worker/e2ee.worker?worker';
|
||||
import E2EEWorker from '../../src/e2ee/worker/e2ee.worker?worker';
|
||||
import type {
|
||||
ChatMessage,
|
||||
RoomConnectOptions,
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
SimulationScenario,
|
||||
VideoCaptureOptions,
|
||||
VideoCodec,
|
||||
} from '../src/index';
|
||||
} from '../../src/index';
|
||||
import {
|
||||
ConnectionQuality,
|
||||
ConnectionState,
|
||||
@@ -34,8 +34,8 @@ import {
|
||||
setLogLevel,
|
||||
supportsAV1,
|
||||
supportsVP9,
|
||||
} from '../src/index';
|
||||
import { isSVCCodec } from '../src/room/utils';
|
||||
} from '../../src/index';
|
||||
import { isSVCCodec } from '../../src/room/utils';
|
||||
|
||||
const $ = <T extends HTMLElement>(id: string) => document.getElementById(id) as T;
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
<textarea id="log"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./sample.ts" type="module"></script>
|
||||
<script src="./demo.ts" type="module"></script>
|
||||
<!-- for icons -->
|
||||
<script src="https://kit.fontawesome.com/7c1c4c7e9c.js" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig",
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
|
||||
"module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
|
||||
@@ -15,6 +15,6 @@
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["../src/**/*", "sample.ts"],
|
||||
"include": ["../../src/**/*", "demo.ts"],
|
||||
"exclude": ["**/*.test.ts", "build/**/*"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
modulePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/example/'],
|
||||
modulePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/examples/'],
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'jsdom',
|
||||
};
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"build:worker:watch": "rollup --watch --config rollup.config.worker.js --bundleConfigAsCjs",
|
||||
"build-docs": "typedoc",
|
||||
"proto": "protoc --es_out src/proto --es_opt target=ts -I./protocol ./protocol/livekit_rtc.proto ./protocol/livekit_models.proto",
|
||||
"sample": "vite example -c vite.config.mjs",
|
||||
"examples:demo": "vite examples/demo -c vite.config.mjs",
|
||||
"lint": "eslint src",
|
||||
"test": "vitest run src",
|
||||
"deploy": "gh-pages -d example/dist",
|
||||
"format": "prettier --write src example/sample.ts",
|
||||
"format:check": "prettier --check src",
|
||||
"deploy": "gh-pages -d examples/demo/dist",
|
||||
"format": "prettier --write src examples/**/*.ts",
|
||||
"format:check": "prettier --check src examples/**/*.ts",
|
||||
"ci:publish": "pnpm build && pnpm compat && changeset publish",
|
||||
"downlevel-dts": "downlevel-dts ./dist/ ./dist/ts4.2 --to=4.2",
|
||||
"compat": "eslint --no-eslintrc --config ./.eslintrc.dist.cjs ./dist/livekit-client.umd.js",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"example/**/*.ts",
|
||||
"examples/**/*.ts",
|
||||
".eslintrc.cjs",
|
||||
".eslintrc.dist.cjs",
|
||||
"jest.config.js",
|
||||
|
||||
Reference in New Issue
Block a user