Merge pull request #11 from saleor/local-development-link
Local development
This commit is contained in:
commit
7ee1eca760
3 changed files with 26 additions and 6 deletions
20
README.md
20
README.md
|
@ -17,6 +17,26 @@ npm i @saleor/app-sdk
|
||||||
|
|
||||||
## Development
|
## 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
|
### Code style
|
||||||
|
|
||||||
Before committing the code, Git pre-hooks will check staged changes for
|
Before committing the code, Git pre-hooks will check staged changes for
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublishOnly": "pnpm build",
|
"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",
|
"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": "uvu -r tsm spec",
|
||||||
"test-watch": "watchlist src spec -- pnpm test",
|
"test-watch": "watchlist src spec -- pnpm test",
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"prettier": "2.6.2",
|
"prettier": "2.6.2",
|
||||||
"tsm": "^2.2.1",
|
"tsm": "^2.2.1",
|
||||||
"tsup": "^6.1.3",
|
"tsup": "^6.2.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
"uvu": "^0.5.6",
|
"uvu": "^0.5.6",
|
||||||
"watchlist": "^0.3.1"
|
"watchlist": "^0.3.1"
|
||||||
|
|
|
@ -21,7 +21,7 @@ specifiers:
|
||||||
prettier: 2.6.2
|
prettier: 2.6.2
|
||||||
retes: ^0.29.4
|
retes: ^0.29.4
|
||||||
tsm: ^2.2.1
|
tsm: ^2.2.1
|
||||||
tsup: ^6.1.3
|
tsup: ^6.2.0
|
||||||
typescript: ^4.7.4
|
typescript: ^4.7.4
|
||||||
uvu: ^0.5.6
|
uvu: ^0.5.6
|
||||||
watchlist: ^0.3.1
|
watchlist: ^0.3.1
|
||||||
|
@ -49,7 +49,7 @@ devDependencies:
|
||||||
husky: 8.0.1
|
husky: 8.0.1
|
||||||
prettier: 2.6.2
|
prettier: 2.6.2
|
||||||
tsm: 2.2.1
|
tsm: 2.2.1
|
||||||
tsup: 6.1.3_typescript@4.7.4
|
tsup: 6.2.0_typescript@4.7.4
|
||||||
typescript: 4.7.4
|
typescript: 4.7.4
|
||||||
uvu: 0.5.6
|
uvu: 0.5.6
|
||||||
watchlist: 0.3.1
|
watchlist: 0.3.1
|
||||||
|
@ -2279,8 +2279,8 @@ packages:
|
||||||
esbuild: 0.14.49
|
esbuild: 0.14.49
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/tsup/6.1.3_typescript@4.7.4:
|
/tsup/6.2.0_typescript@4.7.4:
|
||||||
resolution: {integrity: sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==}
|
resolution: {integrity: sha512-PNRQY/eUrtQgPHITOa9qU1Qss2AKHZl9OJFMsQGF+rpcQBMIYh5i0BUh5Gam8C8J0OuNQOGazqBEQHWMFLJKlQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|
Loading…
Reference in a new issue