Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/lit 2591 js sdk remove all redundantunused build processes & refactor: delete cypress directory #496

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e16c3eb
chore(build): remove unused `pipe` command
Ansonhkg May 31, 2024
28276bc
chore(build): remove outdated `gen:lib` command
Ansonhkg May 31, 2024
be35078
refactor(tool):
Ansonhkg May 31, 2024
f0f9bc1
refactor(tool): rename `test:watch` to `test:unit:watch`
Ansonhkg May 31, 2024
7145d6b
refactor(tool): rename `test:bun` with `test:unit:bun` and rename fil…
Ansonhkg May 31, 2024
0a4e1bc
refactor(tool): remove `publish:app:html` command and `build-html.mjs…
Ansonhkg May 31, 2024
ff4b88e
refactor(tool): remove `buildAndPublish` command
Ansonhkg May 31, 2024
35e3564
refactor(tool): remove `bbp` command
Ansonhkg May 31, 2024
a66ff1f
refactor(tool): remove `test:custom` command & script
Ansonhkg May 31, 2024
2ac510f
refactor(tool): remove `gen:demo` command & script
Ansonhkg May 31, 2024
d39bbe6
refactor(tool): remove `gen:html` command & related scripts
Ansonhkg May 31, 2024
e97072a
refactor(tool): remove `gen:react` and scripts
Ansonhkg May 31, 2024
1ee90c0
refactor(tool): remove outdated browser e2e tests & scripts
Ansonhkg May 31, 2024
9ce9ef6
refactor(tool): remove `cypress` completely
Ansonhkg May 31, 2024
9f5245c
refactor(tool): remove `gen:nodejs` command & scripts
Ansonhkg May 31, 2024
8568f48
refactor: remove `lit-contracts` dir
Ansonhkg May 31, 2024
c2b3222
refactor(tool): remove `gen:contracts` command
Ansonhkg May 31, 2024
ff9662c
feat(gen:internal-dev): improve script to avoid linting issue
Ansonhkg May 31, 2024
228f7e7
refactor(tool): remove unused `update:contracts` command
Ansonhkg May 31, 2024
4cefe95
refactor(tool): remove `delete:${?}` commands & script
Ansonhkg May 31, 2024
a4b81d8
refactor(tool): remove `endisable-cache` script & commands
Ansonhkg May 31, 2024
51a7e52
refactor(tool): remove `dev` & `yalc` commands & scripts
Ansonhkg May 31, 2024
6edba25
refactor(tool): update command `v` to run script directly
Ansonhkg May 31, 2024
78cbd6d
refactor(tool): remove `npm:login` command
Ansonhkg May 31, 2024
38a7b5f
refactor(tool): remove `b` command
Ansonhkg May 31, 2024
c5f7fd8
refactor(tool): remove `txServer` command & scripts
Ansonhkg May 31, 2024
6e122ee
refactor(tool): remove `apps` commands & scripts
Ansonhkg May 31, 2024
9c71185
refactor(tool): remove `gen:config` command
Ansonhkg May 31, 2024
e830a8a
refactor(tool): remove `test_build.sh` script
Ansonhkg May 31, 2024
125dae9
refactor(tool): remove `bun-link.sh` script
Ansonhkg May 31, 2024
6413c44
refactor(tool): remove `dev` file
Ansonhkg May 31, 2024
c5f4274
doc: remove unused `consolelog-test`
Ansonhkg May 31, 2024
c407d7e
chore: remove unused `cypress.config.ts` file
Ansonhkg May 31, 2024
6816df7
chore(tool): remove unused `cloneFunc` function
Ansonhkg May 31, 2024
5e8373c
chore: remove unused `babel.config.json` file
Ansonhkg May 31, 2024
0294088
fix(build): linting when `build:dev`
Ansonhkg May 31, 2024
7e55168
refactor(tool): remove unused `--watch` command
Ansonhkg May 31, 2024
386f5fb
feat(tool): add warning message to `--fetch` flag to `update:contract…
Ansonhkg May 31, 2024
22339b9
refactor(tool): remove `bump` commands
Ansonhkg May 31, 2024
0cb9460
refactor(package.json): remove unused devDependencies
Ansonhkg May 31, 2024
e8f638c
refactor(tool): remove `apps` directory in favour of developer guide …
Ansonhkg May 31, 2024
fc184e7
refactor(tool): remove `lit.config.json` and its scripts
Ansonhkg May 31, 2024
5b7de6e
chore: remove unused files
Ansonhkg May 31, 2024
ff97eb3
refactor(package.json): remove unused dependencies
Ansonhkg May 31, 2024
b7928f5
feat: update `yarn.lock` file
Ansonhkg May 31, 2024
84cc66a
refactor(tool): update `build` command to use `nx` as `./app` directo…
Ansonhkg May 31, 2024
e4b8b6a
feat: update `yarn.lock`
Ansonhkg May 31, 2024
7e42971
fix: add `@types/secp256k1` back to fix:
Ansonhkg May 31, 2024
5feb614
fix(package.json): add jose & spruceid dependencies back
Ansonhkg Jun 3, 2024
fb2092a
fix(package.json): add jose & spruceid dependencies back
Ansonhkg Jun 3, 2024
eca67bd
Merge branch 'master' into feature/lit-2591-js-sdk-remove-all-redunda…
Ansonhkg Jun 3, 2024
9c0cc96
Merge branch 'master' into feature/lit-2591-js-sdk-remove-all-redunda…
Ansonhkg Jun 3, 2024
45cbf68
chore: prettier
Ansonhkg Jun 3, 2024
cdb31ba
feat: update yarn.lock
Ansonhkg Jun 3, 2024
11659f6
refactor: delete `cypress` directory
Ansonhkg Jun 5, 2024
74d219d
Merge branch 'feature/lit-2591-js-sdk-remove-all-redundantunused-buil…
Ansonhkg Jun 5, 2024
a34ddd1
Merge pull request #485 from LIT-Protocol/feature/lit-2591-js-sdk-rem…
Ansonhkg Jun 5, 2024
78109f5
Merge branch 'master' of https://github.com/LIT-Protocol/js-sdk into …
Ansonhkg Jul 10, 2024
28012ac
chore: update `yarn.lock`
Ansonhkg Jul 10, 2024
a0d4fdf
feat: use raw nx command
Ansonhkg Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading