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-yarn-workspaces

v3.0.14

Published

yarn create yarn-workspaces npx create-yarn-workspaces

Readme

create-yarn-workspaces

快速初始化 Yarn Workspaces 專案結構 / Quickly initialize Yarn Workspaces project structure

安裝與使用 / Installation & Usage

# 使用 Yarn
yarn create yarn-workspaces

# 使用 npx
npx create-yarn-workspaces

# 使用 pnpm
pnpm create yarn-workspaces

功能特性 / Features

  • 🚀 快速初始化 - 一鍵創建完整的 Yarn Workspaces 專案結構
  • 📦 Lerna 整合 - 自動檢測並更新現有的 Lerna 配置
  • 📝 智能設定 - 自動配置 package.json、tsconfig 等開發環境檔案
  • 🔧 靈活選項 - 支援自定義初始化回呼與多種配置選項
  • 🗂️ 目錄管理 - 根據 workspaces 配置自動創建 packages 目錄

命令列選項 / CLI Options

| 選項 / Option | 別名 / Alias | 說明 / Description | |--------------|-------------|-------------------| | --name | -n | 指定 Package 名稱 / Specify package name | | --ignoreExistsPackage | -i | 忽略已存在的 Package / Ignore existing package | | --ignoreParentWorkspaces | | 忽略父層 Workspaces / Ignore parent workspaces | | --debug | | 啟用除錯模式 / Enable debug mode |

API 使用 / API Usage

import { createYarnWorkspaces, IOptions } from 'create-yarn-workspaces';

// 基本使用 / Basic usage
const success = createYarnWorkspaces('./my-project');

// 帶選項 / With options
const options: IOptions = {
  ignoreExistsPackage: true,
  ignoreParentWorkspaces: false,
  initPackageJson: (pkg) => {
    pkg.author = 'Your Name';
    return pkg;
  }
};

createYarnWorkspaces('./my-project', options);

目錄結構 / Directory Structure

初始化後的專案結構 / Project structure after initialization:

my-project/
├── package.json          # Workspaces 配置 / Workspaces config
├── lerna.json           # Lerna 配置(如果存在)/ Lerna config (if exists)
├── tsconfig.json        # TypeScript 配置 / TypeScript config
├── .gitignore           # Git 忽略規則 / Git ignore rules
├── .eslintrc.json       # ESLint 配置 / ESLint config
└── packages/            # 套件目錄 / Packages directory
    └── .gitkeep

相關專案 / Related Projects

授權 / License

ISC