Skip to content

Commit

Permalink
Merge branch 'master' into feature/lit-3549-js-sdk-add-datiltest-support
Browse files Browse the repository at this point in the history
Signed-off-by: Anson <ansonox@gmail.com>
  • Loading branch information
Ansonhkg committed Jul 12, 2024
2 parents 3d2830e + 7cbbb6f commit 236822d
Show file tree
Hide file tree
Showing 479 changed files with 1,220 additions and 156,277 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
NETWORK: cayenne
NETWORK: datil-dev
DEBUG: true
MAX_ATTEMPTS: 3
steps:
Expand Down
46 changes: 1 addition & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,6 @@ yarn build:dev
yarn build
```

## Running Test Apps

The test apps are configured to automatically import all modules and expose all module functions. For browsers, you can access these functions using `window.LitJsSdk_<package_name>.<function_name>`

```jsx
// Running apps...
// react: http://localhost:4003
// nodejs: in the terminal
yarn apps
```

or running individually

```
// react
yarn nx run react:serve
// nodejs
yarn nx run nodejs:serve
```

## Run unit tests

```
Expand All @@ -165,12 +144,7 @@ yarn test:local

## Creating a new library

By default, NX provides a command to generate a library
`nx generate @nx/js:library`. However, it doesn't have an esbuild built-in so that we've created a custom tool that modify the build commands.

```js
yarn gen:lib <package-name> <tag>
```
`nx generate @nx/js:library`

## Create a new react demo app using the Lit JS SDK

Expand Down Expand Up @@ -271,30 +245,12 @@ The following will serve the react testing app and launch the cypress e2e testin
yarn test:local
```

### Environments

There are currently three environments can be tested on, each of which can be generated from a custom command, which would automatically import all the libraries in `./packages/*`. The UI of HTML & React are visually identical but they are using different libraries.

| Environment | Generate Command | Test Location |
| ----------- | ----------------- | -------------------------- |
| React | `yarn gen:react` | http://localhost:4003 |
| NodeJs | `yarn gen:nodejs` | `yarn nx run nodejs:serve` |

### Unit Tests

```jsx
yarn test:unit
```

### E2E Testing with Metamask using Cypress (for Browser)

<b>React</b>

```jsx
// E2E React
yarn tools --test --e2e react
```

## Testing with a Local Lit Node

First, deploy your Lit Node Contracts, since the correct addresses will be pulled from the `../lit-assets/blockchain/contracts/deployed-lit-node-contracts-temp.json` file.
Expand Down
24 changes: 0 additions & 24 deletions apps/demo-encrypt-decrypt-react/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions apps/demo-encrypt-decrypt-react/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions apps/demo-encrypt-decrypt-react/package.json

This file was deleted.

15 changes: 0 additions & 15 deletions apps/demo-encrypt-decrypt-react/project.json

This file was deleted.

Binary file not shown.
43 changes: 0 additions & 43 deletions apps/demo-encrypt-decrypt-react/public/index.html

This file was deleted.

Binary file removed apps/demo-encrypt-decrypt-react/public/logo192.png
Binary file not shown.
Binary file removed apps/demo-encrypt-decrypt-react/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions apps/demo-encrypt-decrypt-react/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions apps/demo-encrypt-decrypt-react/public/robots.txt

This file was deleted.

91 changes: 0 additions & 91 deletions apps/demo-encrypt-decrypt-react/src/App.css

This file was deleted.

8 changes: 0 additions & 8 deletions apps/demo-encrypt-decrypt-react/src/App.test.js

This file was deleted.

Loading

0 comments on commit 236822d

Please sign in to comment.