Skip to content

Files

Latest commit

f428fce · Jan 28, 2025

History

History
Cannot retrieve ahead/behind information for this branch.

Folders and files

NameName
Last commit message
Last commit date
Jan 27, 2025
Jan 27, 2025
Mar 1, 2024
Jan 27, 2025
Jan 20, 2025
Jan 3, 2024
Mar 1, 2024
May 24, 2022
Jan 13, 2025
Jan 13, 2025
Oct 12, 2022
Jul 20, 2022
Jan 20, 2025
Jan 24, 2025
Jul 20, 2022
Jan 20, 2025
Jan 28, 2025
Jan 24, 2025
Jan 24, 2025
Nov 30, 2023
Jan 20, 2025
Jan 24, 2025

README.md

Discord Badge

SDK for Saleor Apps

SDK for building Saleor Apps.

npm version badge npm downloads count

🚨 Alpha phase

App SDK is in the early stage at the moment. Every API below 1.x.x release is likely to change.

Feel free to play with SDK and move its code directly to your app.

Installing

npm i @saleor/app-sdk

Docs

You can find the documentation here.

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
pnpm watch

Now any code change will trigger build operation automatically.

  1. In your project directory:
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 following the code styles. If you would like to format the code by yourself, run the command:

pnpm lint

Running Integration Tests

To run the integration tests (e.g., Redis APL tests), follow these steps:

  1. Start a Redis container:
docker run --name saleor-app-sdk-redis -p 6379:6379 -d redis:7-alpine
  1. Run the integration tests:
pnpm test:integration
  1. (Optional) Clean up the Redis container:
docker stop saleor-app-sdk-redis
docker rm saleor-app-sdk-redis

Note: If your Redis instance is running on a different host or port, you can set the REDIS_URL environment variable:

REDIS_URL=redis://custom-host:6379 pnpm test:integration