Skip to content

Commit 7348012

Browse files
author
Hyunje Jun
committed
Change package name to @line/bot-sdk
1 parent 1fea4be commit 7348012

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Node.js SDK for LINE Messaging API
1111
Using [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/):
1212

1313
``` bash
14-
$ npm install NPM_PACKAGE_NAME
15-
$ yarn add NPM_PACKAGE_NAME
14+
$ npm install @line/bot-sdk
15+
$ yarn add @line/bot-sdk
1616
```
1717

1818
### Documentation

docs/pages/api-reference.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ When imported via `require` or `import`, 3 interfaces are exposed.
44

55
``` js
66
// CommonJS
7-
const line = require('NPM_PACKAGE_NAME');
7+
const line = require('@line/bot-sdk');
88

99
// ES2015 modules or TypeScript
10-
import * as line from 'NPM_PACKAGE_NAME';
10+
import * as line from '@line/bot-sdk';
1111
```
1212

1313
For the detailed API reference of each, please refer to their own pages.
@@ -16,14 +16,14 @@ For the detailed API reference of each, please refer to their own pages.
1616
- [validateSignature](api-reference/validate-signature.md)
1717
- [middleware](api-reference/middleware.md)
1818

19-
Exceptions can be imported via `NPM_PACKAGE_NAME/exceptions`.
19+
Exceptions can be imported via `@line/bot-sdk/exceptions`.
2020

2121
``` js
2222
// CommonJS
23-
const JSONParseError = require('NPM_PACKAGE_NAME/exceptions').JSONParseError;
23+
const JSONParseError = require('@line/bot-sdk/exceptions').JSONParseError;
2424

2525
// ES2015 modules or TypeScript
26-
import { JSONParseError } from 'NPM_PACKAGE_NAME/exceptions';
26+
import { JSONParseError } from '@line/bot-sdk/exceptions';
2727
```
2828

2929
- [Exceptions](api-reference/exceptions.md)

docs/pages/api-reference/exceptions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Exceptions
22

3-
Exception classes can be imported via `NPM_PACKAGE_NAME/exceptions'`.
3+
Exception classes can be imported via `@line/bot-sdk/exceptions'`.
44

55
``` js
66
// CommonJS
7-
const HTTPError = require('NPM_PACKAGE_NAME/exceptions').HTTPError;
8-
const JSONParseError = require('NPM_PACKAGE_NAME/exceptions').JSONParseError;
9-
const ReadError = require('NPM_PACKAGE_NAME/exceptions').ReadError;
10-
const RequestError = require('NPM_PACKAGE_NAME/exceptions').RequestError;
11-
const SignatureValidationFailed = require('NPM_PACKAGE_NAME/exceptions').SignatureValidationFailed;
7+
const HTTPError = require('@line/bot-sdk/exceptions').HTTPError;
8+
const JSONParseError = require('@line/bot-sdk/exceptions').JSONParseError;
9+
const ReadError = require('@line/bot-sdk/exceptions').ReadError;
10+
const RequestError = require('@line/bot-sdk/exceptions').RequestError;
11+
const SignatureValidationFailed = require('@line/bot-sdk/exceptions').SignatureValidationFailed;
1212

1313
// ES2015 modules or TypeScript
1414
import {
@@ -17,7 +17,7 @@ import {
1717
ReadError,
1818
RequestError,
1919
SignatureValidationFailed,
20-
} from 'NPM_PACKAGE_NAME/exceptions';
20+
} from '@line/bot-sdk/exceptions';
2121
```
2222

2323
#### Type signature

docs/pages/getting-started/basic-usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ default. Nevertheless, it can surely be used with plain JavaScript too.
99

1010
``` js
1111
// CommonJS
12-
const line = require('NPM_PACKAGE_NAME');
12+
const line = require('@line/bot-sdk');
1313

1414
// ES2015 modules or TypeScript
15-
import * as line from 'NPM_PACKAGE_NAME';
15+
import * as line from '@line/bot-sdk';
1616
```
1717

1818
## Configuration
@@ -36,7 +36,7 @@ Here is a synopsis of echoing webhook server with [Express](https://expressjs.co
3636

3737
``` js
3838
const express = require('express');
39-
const line = require('NPM_PACKAGE_NAME');
39+
const line = require('@line/bot-sdk');
4040

4141
const config = {
4242
channelAccessToken: 'YOUR_CHANNEL_ACCESS_TOKEN',

docs/pages/getting-started/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Please install via [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/).
44

55
```bash
6-
$ npm install NPM_PACKAGE_NAME
7-
$ yarn add NPM_PACKAGE_NAME
6+
$ npm install @line/bot-sdk
7+
$ yarn add @line/bot-sdk
88
```
99

1010
You can build from source. Please clone the repository and run the following

docs/pages/guide/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ The `Client` class is provided by the main module.
1111

1212
``` js
1313
// CommonJS
14-
const Client = require('NPM_PACKAGE_NAME').Client;
14+
const Client = require('@line/bot-sdk').Client;
1515

1616
// ES6 modules or TypeScript
17-
import { Client } from 'NPM_PACKAGE_NAME';
17+
import { Client } from '@line/bot-sdk';
1818
```
1919

2020
To create a client instance:

docs/pages/guide/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The library is built to just-work with TypeScript too, so import the library and
5353
there you go.
5454

5555
``` typescript
56-
import { Client, validateSignature, middleware } from "NPM_PACKAGE_NAME";
56+
import { Client, validateSignature, middleware } from "@line/bot-sdk";
5757
```
5858

5959
Webhook event and message object types are defined in the `Line` namespace, e.g.

docs/pages/guide/webhook.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The server above listens to 8080 and will response with an empty object for
5656

5757
``` js
5858
const express = require('express')
59-
const middleware = require('NPM_PACKAGE_NAME').middleware
59+
const middleware = require('@line/bot-sdk').middleware
6060

6161
const app = express()
6262

@@ -107,9 +107,9 @@ The errors can be handled with [error middleware](https://github.com/senchalabs/
107107

108108
``` js
109109
const express = require('express')
110-
const middleware = require('NPM_PACKAGE_NAME').middleware
111-
const JSONParseError = require('NPM_PACKAGE_NAME/exceptions').JSONParseError
112-
const SignatureValidationFailed = require('NPM_PACKAGE_NAME/exceptions').SignatureValidationFailed
110+
const middleware = require('@line/bot-sdk').middleware
111+
const JSONParseError = require('@line/bot-sdk/exceptions').JSONParseError
112+
const SignatureValidationFailed = require('@line/bot-sdk/exceptions').SignatureValidationFailed
113113

114114
const app = express()
115115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "line-bot-sdk-nodejs",
2+
"name": "@line/bot-sdk",
33
"version": "1.0.0",
44
"description": "Node.js SDK for LINE Messaging API",
55
"engines": {

0 commit comments

Comments
 (0)