@semcore/app-center-js-sdk
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "@semcore/app-center-js-sdk", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "module": "./dist/npm/es6/index.js", |
@@ -1,75 +0,6 @@ | ||
# App center JS SDK | ||
# Semrush App center JS SDK | ||
## How to work with NPM in gar | ||
## References | ||
[Link](./docs/working_with_gar_and_npm.md) | ||
## Concept | ||
We provide our customers with two ways to use our SDK: | ||
- downloading from a package manager (NPM, Yarn, etc.) | ||
- downloading from static | ||
So we have webpack configurations for each method. | ||
### Package manager | ||
This configuration ([webpack-config-npm.js](./webpack-config-npm.js)) builds and puts files to `./dist/npm/`. | ||
The final bundle contains: | ||
- `index.js` — main js file | ||
- `index.d.ts` — typings | ||
- `SM.d.ts` — typings | ||
### Static | ||
This configuration ([webpack-config-sdk.js](./webpack-config-sdk.js)) builds and puts files to `./dist/sdk/` | ||
The final bundle only has js file (`sdk_<%SEMVER%>.js`). | ||
## NPM commands | ||
### Requires | ||
``` | ||
node >= 18 | ||
``` | ||
### Install dependencies | ||
```bash | ||
$ npm i | ||
``` | ||
### Linting | ||
To lint *.ts files run script | ||
```bash | ||
$ npm run lint | ||
``` | ||
also you can run this script with code fix | ||
```bash | ||
$ npm run lint:fix | ||
``` | ||
### Testing | ||
To test code run script | ||
```bash | ||
$ npm run test | ||
``` | ||
### Build npm package | ||
```bash | ||
$ npm run build:npm | ||
``` | ||
### Build SDK for cdn | ||
```bash | ||
$ npm run build:sdk | ||
``` | ||
- Learn more about [Semrush](https://www.semrush.com) and [Semrush App Center](https://www.semrush.com/apps/docs/appcenter-overview) | ||
- Learn more about our SDK in [our documentation](https://www.semrush.com/apps/docs/js-sdk-reference/overview) |
17407
6
7