Merge pull request #11 from saleor/local-development-link

Local development
This commit is contained in:
Krzysztof Wolski 2022-08-01 12:04:34 +02:00 committed by GitHub
commit 7ee1eca760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 6 deletions

View file

@ -17,6 +17,26 @@ npm i @saleor/app-sdk
## Development
### How to link development version to your project
If you would like to develop the SDK and test it with existing project:
1. In the Saleor App SDK directory run command
```bash
pnpm watch
```
Now any code change will trigger build operation automatically.
2. In your project directory:
```bash
pnpm add ../saleor-app-sdk/dist
```
As path to your local copy of the App SDK may be different, adjust it accordingly.
### Code style
Before committing the code, Git pre-hooks will check staged changes for

View file

@ -6,7 +6,7 @@
"main": "index.js",
"scripts": {
"prepublishOnly": "pnpm build",
"watch": "tsc -w",
"watch": "tsup-node src/* --format esm,cjs --dts --watch",
"build": "tsup-node src/* --format esm,cjs --dts && clear-package-json package.json -o dist/package.json --fields publishConfig",
"test": "uvu -r tsm spec",
"test-watch": "watchlist src spec -- pnpm test",
@ -39,7 +39,7 @@
"husky": "^8.0.1",
"prettier": "2.6.2",
"tsm": "^2.2.1",
"tsup": "^6.1.3",
"tsup": "^6.2.0",
"typescript": "^4.7.4",
"uvu": "^0.5.6",
"watchlist": "^0.3.1"

View file

@ -21,7 +21,7 @@ specifiers:
prettier: 2.6.2
retes: ^0.29.4
tsm: ^2.2.1
tsup: ^6.1.3
tsup: ^6.2.0
typescript: ^4.7.4
uvu: ^0.5.6
watchlist: ^0.3.1
@ -49,7 +49,7 @@ devDependencies:
husky: 8.0.1
prettier: 2.6.2
tsm: 2.2.1
tsup: 6.1.3_typescript@4.7.4
tsup: 6.2.0_typescript@4.7.4
typescript: 4.7.4
uvu: 0.5.6
watchlist: 0.3.1
@ -2279,8 +2279,8 @@ packages:
esbuild: 0.14.49
dev: true
/tsup/6.1.3_typescript@4.7.4:
resolution: {integrity: sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==}
/tsup/6.2.0_typescript@4.7.4:
resolution: {integrity: sha512-PNRQY/eUrtQgPHITOa9qU1Qss2AKHZl9OJFMsQGF+rpcQBMIYh5i0BUh5Gam8C8J0OuNQOGazqBEQHWMFLJKlQ==}
engines: {node: '>=14'}
hasBin: true
peerDependencies: