Skip to content

Commit

Permalink
i18n(zh-cn): update reference/publish-to-npm.mdx (withastro#5292)
Browse files Browse the repository at this point in the history
* i18n(zh-cn): update `reference/publish-to-npm.mdx`

* Fix formatting in publish-to-npm guide

---------

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
  • Loading branch information
100gle and yanthomasdev authored Nov 6, 2023
1 parent fcde0cd commit 4c17b53
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/content/docs/zh-cn/reference/publish-to-npm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pnpm create astro@latest my-new-component-directory -- --template component
## 创建模块

:::note[必要条件]
在开始前,请先对以下内容有最基本的了解:
在开始前,请先对以下内容有最基本的了解

- [Node 模块](https://docs.npmjs.com/creating-node-js-modules)
- [模块 Manifest (`package.json`)](https://docs.npmjs.com/creating-a-package-json-file)
Expand Down Expand Up @@ -246,7 +246,7 @@ Astro 没有专门针对开发的模块模式。作为替代的是,你可以

## 发布组件

当模块准备就绪后,你可以使用 `npm publish` 命令将其发布到 npm。如果发布失败,请确保你已经使用 `npm login` 登录了 npm 账号 ,并 `package.json` 文件没有问题。如果发布成功,那就好了!
当模块准备就绪后,你可以使用 `npm publish` 命令将其发布到 npm。如果发布失败,请确保你已经使用 `npm login` 登录了 npm 账号,并 `package.json` 文件没有问题。如果发布成功,那就好了!

注意 Astro 模块没有 `build` 步骤。Astro 本身支持的任何类型文件(例如 `.astro``.ts``.jsx``.css`)都可以直接发布,无需构建步骤。

Expand All @@ -258,14 +258,14 @@ Astro 没有专门针对开发的模块模式。作为替代的是,你可以

### `package.json` 数据

该库每晚自动更新,拉入每一个使用 `astro-component` 或者 `withastro` 关键字发布到 NPM 的模块。
该库每周自动更新,拉入每一个使用 `astro-component` 或者 `withastro` 关键字发布到 NPM 的模块。

它会从模块的 `package.json` 文件中读取 `name``description``repository``homepage` 数据。

添加头像是凸显品牌的好方法。在你的的模块发布后,你可以[在 GitHub 提交一个 issue](https://github.com/withastro/astro.build/issues/new/choose)并附上你的头像,我们会把它添加到列表中。

:::tip
需要覆盖从 NPM 读取的信息?没问题! [提交带有更新后信息的 issue](https://github.com/withastro/astro.build/issues/new/choose)。我们将使用自定义信息替代 `name``description``homepage`
需要覆盖从 NPM 读取的信息?没问题[提交带有更新后信息的 issue](https://github.com/withastro/astro.build/issues/new/choose)。我们将使用自定义信息替代 `name``description``homepage`
:::

### 集合
Expand All @@ -274,7 +274,7 @@ Astro 没有专门针对开发的模块模式。作为替代的是,你可以

| 集合 | 关键词 |
|------------ | ---------------------------------------- |
| 无障碍辅助功能| `a11y`, `accessibility` |
| 无障碍辅助功能 | `a11y`, `accessibility` |
| 适配器 | `astro-adapter` |
| 统计 | `analytics` |
| CSS + UI | `css`, `ui`, `icon`, `icons`, `renderer` |
Expand Down

0 comments on commit 4c17b53

Please sign in to comment.