Skip to content

Commit

Permalink
Merge pull request #1631 from commercetools/ts_sdk_docs_update
Browse files Browse the repository at this point in the history
docs(typescript): update the docs for the typescript SDK
  • Loading branch information
jenschude authored Sep 30, 2020
2 parents 89f8554 + 8c08238 commit aa630f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [core](/sdk/api/README.md#core)
- [sdk-auth](/sdk/api/sdkAuth.md)
- [sdk-client](/sdk/api/sdkClient.md)
- [typescript-sdk](/sdk/api/typescriptSdk.md)
- [typescript](/sdk/api/typescriptSdk.md)
- [middlewares](/sdk/api/README.md#middlewares)
- [sdk-middleware-auth](/sdk/api/sdkMiddlewareAuth.md)
- [sdk-middleware-http](/sdk/api/sdkMiddlewareHttp.md)
Expand Down
14 changes: 9 additions & 5 deletions docs/sdk/api/typescriptSdk.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# `typescript-sdk`(Alpha package)
# `typescript`

A package used to provide typescript definitions on top of ctp client
We provide a packages written in typescript for using our API

![example usage](typescript_tutorial.gif)

The source code for these packages are located in the [typescript](https://github.com/commercetools/commercetools-sdk-typescript/) repository.

## Install

#### Node.js

```bash
npm install --save @commercetools/typescript-sdk
npm install --save @commercetools/platform-sdk
npm install --save @commercetools/importapi-sdk
npm install --save @commercetools/ml-sdk
```

#### Browser

```html
<script src="https://unpkg.com/@commercetools/typescript-sdk/lib/typescript-sdk.umd.min.js"></script>
<script src="https://unpkg.com/@commercetools/platform-sdk/dist/platform-sdk.umd.js"></script>
<script>
// global: TypescriptSdk
</script>
Expand All @@ -30,7 +34,7 @@ import { createClient } from '@commercetools/sdk-client'
import {
createApiBuilderFromCtpClient,
ApiRoot,
} from '@commercetools/typescript-sdk'
} from '@commercetools/platform-sdk'
import fetch from 'node-fetch'

const projectKey = 'some_project_key'
Expand Down

0 comments on commit aa630f0

Please sign in to comment.