From 4c17b53f55f949e2d94f9b68489de204afc71194 Mon Sep 17 00:00:00 2001 From: Xiaoyue Lin <36526527+100gle@users.noreply.github.com> Date: Tue, 7 Nov 2023 01:26:00 +0800 Subject: [PATCH] i18n(zh-cn): update `reference/publish-to-npm.mdx` (#5292) * 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> --- src/content/docs/zh-cn/reference/publish-to-npm.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/docs/zh-cn/reference/publish-to-npm.mdx b/src/content/docs/zh-cn/reference/publish-to-npm.mdx index ab3b88659dfbf..bf28da26362c0 100644 --- a/src/content/docs/zh-cn/reference/publish-to-npm.mdx +++ b/src/content/docs/zh-cn/reference/publish-to-npm.mdx @@ -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) @@ -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`)都可以直接发布,无需构建步骤。 @@ -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`。 ::: ### 集合 @@ -274,7 +274,7 @@ Astro 没有专门针对开发的模块模式。作为替代的是,你可以 | 集合 | 关键词 | |------------ | ---------------------------------------- | -| 无障碍辅助功能| `a11y`, `accessibility` | +| 无障碍辅助功能 | `a11y`, `accessibility` | | 适配器 | `astro-adapter` | | 统计 | `analytics` | | CSS + UI | `css`, `ui`, `icon`, `icons`, `renderer` |