Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ファイルの利用方法の案内の整備 #78

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ It helps you to use microCMS from JavaScript and Node.js applications.

### Install

Install npm package.
#### Node.js

> [!IMPORTANT]
> v3.0.0 or later requires Node.js **v18 or higher**.
Install npm package.

```bash
$ npm install microcms-js-sdk
Expand All @@ -21,17 +20,32 @@ or
$ yarn add microcms-js-sdk
```

> [!WARNING]
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
> [!IMPORTANT]
> v3.0.0 or later requires Node.js **v18 or higher**.

#### Browser(Self-hosting)

Download and unzip `microcms-js-sdk-x.y.z.tgz` from the [releases page](https://github.com/microcmsio/microcms-js-sdk/releases). Then, host it on any server of your choice and use it. The target file is `./dist/umd/microcms-js-sdk.js`.

```html
<script src="https://unpkg.com/microcms-js-sdk@3.1.0/dist/umd/microcms-js-sdk.js"></script>
<script src="./microcms-js-sdk.js"></script>
```

#### Browser(CDN)

Please load and use the URL provided by an external provider.

```html
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk@3.1.1/dist/umd/microcms-js-sdk.min.js"></script>

or

<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script>
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk/dist/umd/microcms-js-sdk.min.js"></script>
```

> [!WARNING]
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the warning message to reflect the new CDN provider or make it generic.

- > The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
+ > Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
> Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.


### How to use

First, create a client.
Expand Down