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

create-component-template-cli

v1.0.3

Published

create-vue-component-template-cli,A CLI tool for creating standardized Vue 3 + TypeScript + Sass public component templates.

Downloads

492

Readme

create-component-template-cli

一个用于快速创建 Vue 3 + TypeScript + Sass 组件骨架的 CLI 工具。

使用方式

# 通过包名直接执行(适合 npm / npx 用户)
npx create-component-template-cli --version
npx create-component-template-cli

# 通过短命令执行
npx cctc --version
npx cctc

# 本地开发调试
node bin/cli.mjs

# 非交互模式
node bin/cli.mjs --name=MyComponent --rootPath=src/components/platform

# 指定业务模板类型
node bin/cli.mjs --name=MyComponent --rootPath=src/components/platform --templateType=single-pick

# 指定 index.vue 的 Vue 写法
node bin/cli.mjs --name=MyComponent --rootPath=src/components/platform --templateType=multiple-pick --vueTemplateType=normal

参数说明

| 参数 | 必填 | 默认值 | 说明 | | --- | --- | --- | --- | | --name | 是(非交互) | - | 组件名称,PascalCase | | --rootPath | 是(非交互) | - | 输出目录 | | --templateType | 否 | general | 业务模板类型:general / single-pick / multiple-pick | | --vueTemplateType | 否 | setup | index.vue 的 Vue 风格:setup / normal | | --collisionStrategy | 否 | skip | 目录冲突策略:skip / overwrite | | --nonInteractive | 否 | false | 缺少必填参数时直接报错,不进入交互模式 |

模板规则

  1. templateType 只控制业务模板类型。
  2. vueTemplateType 只控制 index.vue 的 Vue 写法。
  3. 无论选择哪种 Vue 风格,最终生成的文件名始终是 src/index.vue

生成目录结构

{rootPath}/{ComponentName}/
├── index.ts
└── src/
    ├── index.vue
    ├── index.scss
    ├── typing.ts
    ├── hook.ts
    └── data.ts