2023-07-13 12:46:23 +00:00
|
|
|
<div align="center">
|
|
|
|
|
|
|
|
[](https://discord.gg/H52JTZAtSH)
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2022-05-26 12:16:30 +00:00
|
|
|
# SDK for Saleor Apps
|
|
|
|
|
2023-02-15 11:07:55 +00:00
|
|
|
SDK for building great [Saleor Apps](https://github.com/saleor/apps).
|
2022-06-07 09:33:36 +00:00
|
|
|
|
2022-06-07 09:33:50 +00:00
|
|
|
<div>
|
|
|
|
|
2022-07-20 14:19:49 +00:00
|
|
|
[](https://www.npmjs.com/package/@saleor/app-sdk)
|
|
|
|
[](https://www.npmjs.com/package/@saleor/app-sdk)
|
2022-06-07 09:33:50 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2022-08-08 12:49:26 +00:00
|
|
|
## 🚨 Alpha phase
|
|
|
|
|
|
|
|
App SDK is on early, alpha stage at the moment. Every API below 1.x.x release is likely to change.
|
|
|
|
|
|
|
|
Feel free to play with SDK and to move its code to your app directly
|
|
|
|
|
2022-06-07 09:33:36 +00:00
|
|
|
## Installing
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm i @saleor/app-sdk
|
2022-07-20 14:19:49 +00:00
|
|
|
```
|
2022-07-20 15:01:37 +00:00
|
|
|
|
2022-08-22 13:47:40 +00:00
|
|
|
## Docs
|
|
|
|
|
2023-08-16 07:12:25 +00:00
|
|
|
Read the docs [here](https://docs.saleor.io/docs/3.x/developer/extending/apps/developing-apps/app-sdk/overview)
|
2022-08-22 13:47:40 +00:00
|
|
|
|
2022-07-20 15:01:37 +00:00
|
|
|
## Development
|
|
|
|
|
2022-07-29 14:02:28 +00:00
|
|
|
### 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.
|
|
|
|
|
2022-07-20 15:01:37 +00:00
|
|
|
### Code style
|
|
|
|
|
|
|
|
Before committing the code, Git pre-hooks will check staged changes for
|
|
|
|
following the code styles. If you would like to format the code by yourself, run
|
|
|
|
the command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pnpm lint
|
|
|
|
```
|