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

@nbicc/common-components

v1.14.1

Published

<p align="center">

Downloads

25

Readme

npm (scoped) npm Netlify Status

安装

组件库依赖 ant-design-vue, vue, @ant-design/icons-vuelodash-es. 请确保这些依赖已经安装.

::: tip 如果你使用 npm 版本 >= 8, npm 将自动安装这些依赖. :::

npm install @nbicc/common-components

使用

import { createApp } from "vue";
import Antd from "ant-design-vue";
import App from "./App";
import "ant-design-vue/dist/antd.css";

import CommonComponents from "@nbicc/common-components";
import "@nbicc/common-components/dist/style.css";

const app = createApp(App);

app.use(Antd).use(CommonComponents).mount("#app");

与 Ant Design Vue 一样, 需要引入样式文件. 一般来说会在 main.js 中引入.

链接

开发指南

组件库使用 Vite 构建, 文档使用 VitePress 构建.

必要的开发环境

  • nodejs >= 16
    • 16 以下的版本不支持自动安装对等依赖
    • vuejs/language-tools 存在已知的问题, 需要 16 以上的版本才能正常工作.

安装依赖

npm install

启动开发服务器

使用 vitepress 的文档服务器作为开发服务器, 会自动监听文件变化并重新编译. 文档位于 docs 目录下.

npm run docs:dev

修改代码...

随便改点什么...

~~运行单元测试 (Vitest)~~

不需要, 因为没有单元测试.

npm run test:unit

提交代码

提交前请阅读关于 Commit Message 的规范 Conventional Commits.

Commit Message 需要遵循 Angular Commit Message Guidelines.

提交前会运行 ESLintPrettier, 检查未通过时会中断提交.

推荐的 IDE 设置

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.