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

dc-create

v0.11.22

Published

项目创建命令行工具

Readme

create-done-coding

项目创建命令行工具 - 快速创建和初始化 done-coding 项目

npm version License: MIT

安装

使用 npm create(推荐)

npm create done-coding
# 或指定项目名称
npm create done-coding my-project

使用 pnpm create

pnpm create done-coding
# 或指定项目名称
pnpm create done-coding my-project

作为 done-coding CLI 的一部分

npm install -g @done-coding/cli
# 然后使用
DC create [projectName]

快速开始

# 创建新项目(交互式)
npm create done-coding

# 创建指定名称的项目
npm create done-coding my-awesome-project

# 仅从 done-coding 系列项目列表中克隆
npm create done-coding my-project -- -c

功能特性

  • 快速创建: 快速创建新的 done-coding 项目
  • 🎯 项目模板: 提供标准化的项目模板
  • 🔄 Git 集成: 集成 Git 仓库初始化和克隆功能
  • 📝 模板处理: 基于模板引擎生成项目文件
  • 💉 信息注入: 自动注入项目配置信息

API 文档

基础命令

create-done-coding [projectName]

创建新项目

# 交互式创建项目
create-done-coding

# 创建指定名称的项目
create-done-coding my-project

# 仅从 done-coding 系列项目列表中克隆远程仓库
create-done-coding my-project -c

参数说明:

  • projectName: 项目名称(可选)

选项说明:

  • -c, --justCloneFromDoneCoding: 是否仅仅从 done-coding 系列项目列表中克隆远程仓库,默认为 false

使用示例

基础使用场景

# 1. 创建新项目(会提示输入项目名称)
npm create done-coding

# 2. 直接指定项目名称
npm create done-coding my-awesome-app

# 3. 从 done-coding 系列项目克隆
npm create done-coding my-clone-project -- --justCloneFromDoneCoding

作为主 CLI 的一部分

# Windows 系统
dc create
dc create my-project
dc create my-project --justCloneFromDoneCoding

# macOS/Linux 系统
DC create
DC create my-project
DC create my-project --justCloneFromDoneCoding

不同创建模式

# 标准项目创建(默认)
npm create done-coding my-project

# 仅克隆模式(从现有项目列表选择)
npm create done-coding my-project -- -c

依赖的工具包

本包集成了以下 done-coding CLI 工具:

  • @done-coding/cli-git: Git 操作功能
  • @done-coding/cli-inject: 信息注入功能
  • @done-coding/cli-template: 模板处理功能
  • @done-coding/cli-utils: 通用工具函数

编程接口

本包提供了编程接口,具体的导出内容请查看包的类型定义文件。

故障排除

常见问题

Q: 项目创建失败

# 检查网络连接
ping registry.npmjs.org

# 检查 Node.js 版本
node --version

# 清除 npm 缓存
npm cache clean --force

Q: Git 克隆失败

# 检查 Git 是否安装
git --version

# 检查网络连接
ping gitee.com

# 使用详细模式查看错误
create-done-coding my-project --verbose

Q: 权限错误

# 检查目录权限
ls -la .

# 使用不同的目录
mkdir ~/my-projects && cd ~/my-projects
npm create done-coding my-project

调试模式

# 查看版本信息
create-done-coding --version

# 查看帮助信息
create-done-coding --help

贡献指南

我们欢迎贡献!请遵循以下步骤:

  1. Fork 本仓库
  2. 创建功能分支:git checkout -b feature/amazing-feature
  3. 提交更改:git commit -m "feat: add amazing feature"
  4. 推送分支:git push origin feature/amazing-feature
  5. 创建 Pull Request

开发环境设置

# 克隆仓库
git clone https://gitee.com/done-coding/done-coding-cli.git
cd done-coding-cli/packages/create

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 构建
pnpm build

# 本地开发测试
node es/cli.mjs --help

# 注意:本地使用 node + 入口文件,发布后使用 bin 命令名
# 功能完全一致,只是调用方式不同

许可证

MIT © JustSoSu

相关链接