@coyoapp/icons

中文文档
2.1.0发布于 2024/01/31MITTypeScriptCommonJS零依赖近 30 天下载 3663

COYO icons

原始使用文档
文档目录4 节
  1. Package management
  2. Build
  3. Publishing
  4. Adding icons via the browser

Icons

pipeline status

This project contains all icons of COYO's custom SVG icon set. If you want to add a new icon to this repository, please make sure that your SVG icon conforms with the overall structure of the other SVG icons:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  <path d="{{ICON_PATH}}"/>
</svg>

Package management

This project is using npm as a package manager. This is especially important if you want to add new dependencies to a project and fail to provide an updated package-lock.json. This will cause the CI build to fail. If dependencies in the package lock do not match those in package.json, npm will exit with an error in the CI build, instead of updating the package lock.

Build

Run npm run build to build the project. The build artifacts will be stored in the dist directory. SVG sprites and style definitions for different preprocessors will automatically be generated in dist/style and dist/svg respectively. Also, standalone HTML previews will become available in the dist directory.

Publishing

The library can be published by running npm publish. However, the preferred way to publish a new version of the library is via the CI setup. A new version of the library will automatically be published to our JFrog Artifactory when pushing a new tag on the master branch. To simplyfy this process, you can use the following npm commands:

  • npm run release:major releases a new major version
  • npm run release:minor releases a new minor version
  • npm run release:patch releases a new patch version

These commands will automatically increase the version number in the package.json and package-lock.json, commit the changed files, create a corresponding git tag and push everything to the remote branch. This will then automatically trigger an update of https://coyoapp.gitlab.io/icons and publish a new library version.

Adding icons via the browser

  1. Go to Repository > Files > assets and upload your new icon to the assets directory.

  2. Upload the files to the master branch and add a commit message.

  3. Navigate to CI/CD > Pipelines and find the pipeline triggered by your recent commit. Than run the manual version job to automatically trigger the build and publish jobs for a new patch release.

版本与发布记录

@coyoapp/icons 共发布 68 个版本,首次发布于 2021/01/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.1.0latest2024/01/312 年前
2.0.312022/12/133 年前
2.0.302022/12/133 年前
2.0.292022/11/074 年前
2.0.282022/09/194 年前
2.0.272022/08/194 年前

关于 @coyoapp/icons 的常见问题

@coyoapp/icons 是什么?

COYO icons

如何安装 @coyoapp/icons?

在项目目录运行 npm install @coyoapp/icons,或使用 pnpm add / yarn add / bun add。

@coyoapp/icons 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@coyoapp/icons 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@coyoapp/icons 可以商用吗?

@coyoapp/icons 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@coyoapp/icons 的下载量有多少?

根据 npm 官方下载统计,@coyoapp/icons 在 2026/10/11 – 2026/11/09 这 30 天内被下载 3,663 次,日均约 122 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@coyoapp/icons 还在维护吗?

最新版本 2.1.0 发布于 2024/01/31(2 年前);至今共发布 68 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/01/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。