Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 23 additions & 13 deletions pdl-live-react/.gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Swap the comments on the following lines if you wish to use zero-installs
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
# Documentation here: https://yarnpkg.com/features/caching#zero-installs
node_modules
dist
dist-ssr
*.local

#!.yarn/cache
.pnp.*
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

####
node_modules/
# Playwright
/test-results/
/playwright-report/
/blob-report/
Expand Down
3 changes: 3 additions & 0 deletions pdl-live-react/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
1 change: 0 additions & 1 deletion pdl-live-react/.yarnrc.yml

This file was deleted.

36 changes: 23 additions & 13 deletions pdl-live-react/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# PDL Viewer
# Prompt Declaration Language - Viewer

To get started, make sure you have a recent version of
[NodeJS](https://nodejs.org/en/download) installed and
[Yarn](https://classic.yarnpkg.com/lang/en/docs/install). On MacOS,
these can be installed via `brew install node yarn`.
[Rust](https://www.rust-lang.org/tools/install).

## Implementation Details

The PDL Viewer uses [Vite](https://vite.dev/) for bundling,
[React](https://react.dev/) for the UI,
The PDL Viewer uses [Tauri](https://v2.tauri.app/) to help with
building production platform applications. Under the covers, Tauri uses
[Vite](https://vite.dev/) for bundling.

The code leverages [React](https://react.dev/) for the UI,
[PatternFly](https://www.patternfly.org/) for UI components, and is
written in [TypeScript](https://www.typescriptlang.org/). The React
components are written in [TSX](https://react.dev/learn/typescript)
Expand All @@ -18,29 +20,37 @@ components are written in [TSX](https://react.dev/learn/typescript)

To install dependencies:
```shell
yarn
npm ci
```

To start the watcher:
```shell
yarn dev
npm start
```

Which will open up a local port which you can view in your favorite
browser. Edits to any source files will result in quick and automatic
updates to that running UI.
Which will open a new window. Edits to any source files will result in
quick and automatic updates to that running UI.

## Tests

There are currently only simple tests for: linting, formatting, and
type checking. These can be run via:
```shell
yarn test
npm test
```

## Production

This will generate production bundles in `dist/`
This will generate production web app bundles in `dist/`, and a production platform application.
```shell
npm run build
```

### Production Platform Application Builds

To build production double-clickable applications:
```shell
yarn build
npm run build:app
```

The built applications will be found under `src-tauri/target/release/bundle`.
2 changes: 1 addition & 1 deletion pdl-live-react/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist','test-results','src/**/*.d.ts'] },
{ ignores: ['dist','test-results','src/**/*.d.ts','src-tauri'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
Expand Down
Loading