Skip to content

Commit

Permalink
more react-component cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatel committed Mar 19, 2024
1 parent f1e1333 commit ea4e03b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 55 deletions.
14 changes: 0 additions & 14 deletions .github/CONTRIBUTING.md
Expand Up @@ -18,7 +18,6 @@ I've copy/pasted the whole document there, without the previous two headings.
- [Install python dependencies](#install-python-dependencies)
- [Start the Chainlit server from source](#start-the-chainlit-server-from-source)
- [Start the UI from source](#start-the-ui-from-source)
- [Develop locally on `libs/react-components`](#develop-locally-on-libsreact-components)
- [Run the tests](#run-the-tests)
- [Run one test](#run-one-test)

Expand Down Expand Up @@ -117,19 +116,6 @@ pnpm run dev --port 5174

If you visit `http://127.0.0.1:5174/`, it should connect to your local server. If the local server is not running, it should say that it can't connect to the server.

## Develop locally on `libs/react-components`

Reusable UI components are living in the separate npm package `libs/react-components`. The main Chainlit UI build and import that package automatically.

You can enable hot module replacement for development.

```sh
cd libs/react-components
pnpm run build:watch
```

This will watch for file changes in `libs/react-components` and automatically rebuild the library as you develop.

## Run the tests

Run `pnpm test`
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Expand Up @@ -14,9 +14,6 @@ jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit
tests-components:
uses: ./.github/workflows/tests-components.yaml
secrets: inherit
ci:
runs-on: ubuntu-latest
name: Run CI
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/tests-components.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions package.json
Expand Up @@ -19,16 +19,13 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"test": "pnpm exec ts-node ./cypress/support/e2e.ts",
"test:react-components": "cd libs/react-components && pnpm test",
"test:ui": "cd frontend && pnpm test",
"prepare": "husky install",
"lintUi": "cd frontend && pnpm run lint",
"formatUi": "cd frontend && pnpm run format",
"lint:react-components": "cd libs/react-components && pnpm run lint",
"format:react-components": "cd libs/react-components && pnpm run format",
"lintPython": "cd backend && poetry run mypy chainlit/",
"formatPython": "black `git ls-files | grep '.py$'` && isort --profile=black .",
"buildUi": "cd libs/react-client && pnpm run build && cd ../react-components && pnpm run build && cd ../copilot && pnpm run build && cd ../../frontend && pnpm run build",
"build:react-components": "cd libs/react-client && pnpm build && cd ../react-components && pnpm build",
"buildUi": "cd libs/react-client && pnpm run build && && cd ../copilot && pnpm run build && cd ../../frontend && pnpm run build",
"build": "pnpm run buildUi && (mkdir -p backend/chainlit/frontend && cp -R frontend/dist backend/chainlit/frontend) && (mkdir -p backend/chainlit/copilot && cp -R libs/copilot/dist backend/chainlit/copilot) && (cd backend && poetry build)"
}
}

0 comments on commit ea4e03b

Please sign in to comment.