npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ksw-vue-icon-test

v2.0.33

Published

Vue Icon

Downloads

6

Readme

ksw-vue-icon

介绍

图标自动化是一个可以帮助你将 SVG 转换为 VUE 组件代码,并上传至 NPM 以便开发直接使用命令行安装和更新。设计师可以通过此插件快速交付图标文件,它能省去很多不必要的中间环节,从而达到让设计师轻轻一点就更新,开发一条命令就下载的效果,整个过程中两人都不用离开座位多说一句话。

NPM包

请访问 https://www.npmjs.com/package/ksw-vue-icon

ICON 展示页面

请访问 KSW-vue-icon

  • 复制Vue图标组件
  • 查看ICON

入门

安装 NPM 包

npm install ksw-vue-icon --save
yarn add ksw-vue-icon

引用

import { IconName } from 'ksw-vue-icon'
// or
import { KswIcon } from 'ksw-vue-icon'
Vue.use(KswIcon)

用法

<IconImage :size="24" color="#333" />
// 设置 spin 为 true 使图标旋转
<IconLoading :size="24" color="#333" :spin="true" />

展示页配置

安装依赖

yarn install

编译和热重新加载用于开发

yarn dev

编译和缩小以供生产

yarn build

编译 NPM 包

yarn build-packages

Lints and fixes files

yarn lint

部署方法

  1. svg 图标放入 src/svg 文件夹中

  2. 更改 package.json 中的 version

  3. 推送到 github 仓库

图标规范

确保图标基础尺寸是 24×24

如果是彩色图标可以在命名中包含 color 例如 social-color

图标命名请使用英文(不可以含 /)和 -,例如 dewu-logo-original

图标一般有描边 stroke 和填充 fill 两种样式,一个图标只能采用一种形式,不可以混合,默认 fill。想要转为 fill 样式,你可以使用 Outline Stroke(Shift+Command+O) 将图标转换为填充形状。

通过图标命名我们对 svg 处理成单色(去掉原始颜色设置 fill="currentColor")、彩色(保留原始颜色)。

属性

| 属性名称 | 介绍 | 类型 | 默认值 | 注释 | | ---------- | --- | --- | --- | --- | | size | 图标的大小,宽高相同 | number | string | '1em' | | spin | 给图标加旋转效果 | boolean | false | | color | 图标的颜色,默认为当前颜色 | string | string[]| 'currentColor' |

项目更新指令

使用 upv 命令, commit信息 自定义, 示例如下:

    npm run upv commit信息