saleor / saleor-sdk

Deprecated! See the announcement below. JavaScript/TypeScript SDK for building e-commerce experiences and checkouts with Saleor API.
https://github.com/saleor/saleor/discussions/12891
MIT License
129 stars 84 forks source link

Local Development #125

Closed cabudies closed 1 year ago

cabudies commented 3 years ago

How to work on local development for the sdk and map it with saleor-storefront?

jatinbharadwaj commented 3 years ago

clone saleor-sdk switch into a stable branch like master Run these commands

$ npm i 
$ cd lib 
$ npm link

now, clone saleor-storefront

$ cd <your storefront path>

Remove, cut that saleor-sdk from package.json

$ npm i
$ npm link @saleor/sdk
Paste saleor-sdk that been cut previously in package.json

these are the steps I followed and it worked. Hope it'll work for you as well✌🏼

ace-han commented 3 years ago

clone saleor-sdk switch into a stable branch like master Run these commands

$ npm i 
$ cd lib 
$ npm link

now, clone saleor-storefront

$ cd <your storefront path>

Remove, cut that saleor-sdk from package.json

$ npm i
$ npm link @saleor/sdk
Paste saleor-sdk that been cut previously in package.json

these are the steps I followed and it worked. Hope it'll work for you as well✌🏼

@jatinbharadwaj I tried as what you said. However, I could not find the lib folder, will you kindly help?

$ npm i 
$ cd lib  # <-- where is this folder?
$ npm link

image

kudryashov13 commented 3 years ago

clone saleor-sdk switch into a stable branch like master Run these commands

$ npm i 
$ cd lib 
$ npm link

now, clone saleor-storefront

$ cd <your storefront path>

Remove, cut that saleor-sdk from package.json

$ npm i
$ npm link @saleor/sdk
Paste saleor-sdk that been cut previously in package.json

these are the steps I followed and it worked. Hope it'll work for you as well✌🏼

@jatinbharadwaj I tried as what you said. However, I could not find the lib folder, will you kindly help?

$ npm i 
$ cd lib  # <-- where is this folder?
$ npm link

image

Do

npm run prepare

it will create /lib directory