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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gsc-basic/components

v1.0.3

Published

Web Components for GSC Basic Team

Readme

@gsc-basic/components 开发说明

使用 Vite 以 library mode 构建,默认样式体系为 UnoCSS。

目录结构(核心)

packages/components
	index.js                    # 包入口(默认导出 install + re-export src/index.js)
	package.json
	vite.config.mjs             # library build 配置(含 @ 别名)
	uno.config.mjs              # 本包 UnoCSS 配置(含 shadcn preset)
	tsconfig.json               # TS 项目编辑器别名:@/* -> src/*(shadcn 组件使用 TS)

	components.json             # shadcn-vue CLI 配置(本仓库 shadcn 部分使用 TS:typescript=true)
	tailwind.config.js          # 仅用于满足 shadcn-vue CLI 的占位文件(真实样式用 UnoCSS)

	src/
		index.js                  # 组件库对外导出入口(仅导出业务组件)
		styles/tokens.css         # 设计变量(含 shadcn tokens + dark 覆盖)

		<ComponentName>/          # 对外组件(示例:Grid/、ConfigProvider/ 等)
			index.js                # withInstall 包装导出
			src/*.vue               # 组件实现

		components/ui/**          # shadcn-vue 生成/维护的内部 UI 组件(不要从 src/index.js 导出)
		lib/**                    # 内部工具(例如 cn class 合并)

	stories/**/*.stories.js     # Storybook stories

新增“对外组件”的推荐流程

  1. 建目录:packages/components/src/<ComponentName>/src/<ComponentName>.vue

  2. 写导出文件:packages/components/src/<ComponentName>/index.js

推荐模板:

import { withInstall } from '@gsc-basic/utils';
import Comp from './src/<ComponentName>.vue';

export const GscComponentName = withInstall(Comp);
export default GscComponentName;
  1. packages/components/src/index.js 里 re-export:
export * from './<ComponentName>';
  1. 增加 Storybook:packages/components/stories/<ComponentName>.stories.js

Storybook / stories 编写规范

  • stories 目录:packages/components/stories/**/*.stories.js
  • 组件库对外组件:推荐从 @gsc-basic/components 引入(走真实导出路径)