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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sparkle-design-cli

v1.1.9

Published

Sparkle Design CSS Generator - デザインシステムCSSを設定ファイルから生成するツール

Readme

Sparkle Design CLI

デザインシステム CSS を設定ファイルから生成する CLI ツールです。

インストール

npm install -g sparkle-design-cli

使用方法

基本的な使用方法

  1. プロジェクトのルートディレクトリに sparkle.config.json ファイルを作成または配置します:
{
  "primary": "blue",
  "font-mono": "BIZ UDGothic",
  "font-pro": "BIZ UDPGothic",
  "radius": "md"
}
  1. CLI ツールを実行します:
npx sparkle-design-cli

または、グローバルにインストールした場合:

sparkle-design-cli
  1. src/app/sparkle-design.css に CSS ファイルが生成されます。

コマンドオプション

# ヘルプを表示
sparkle-design-cli --help

# カスタム設定ファイルを指定
sparkle-design-cli --config ./config/design.json

# カスタム出力先を指定
sparkle-design-cli --output ./styles/design.css

# 設定ファイルと出力先を両方指定
sparkle-design-cli -c ./config/custom.json -o ./dist/styles.css

オプション一覧

  • -h, --help: ヘルプメッセージを表示
  • -c, --config <パス>: 設定ファイルのパス(デフォルト: ./sparkle.config.json
  • -o, --output <パス>: 出力ファイルのパス(デフォルト: ./src/app/sparkle-design.css

設定ファイル (sparkle.config.json)

設定ファイルの作成

設定ファイルは専用のプラグインから自動生成することを推奨します。プラグインを使用すると、デザインシステムに基づいた適切な設定が自動で生成されます。

設定ファイルは以下の場所に配置してください:

  • プロジェクトのルートディレクトリ(推奨)
  • または -c オプションで指定した任意の場所

設定オプション

  • primary: プライマリカラー(blue, red, orange など)
  • font-pro: プロポーショナルフォント(Google Fonts の名前)
  • font-mono: モノスペースフォント(Google Fonts の名前)
  • radius: 角丸設定(sm, md, lg など)

出力

  • デフォルト出力先: src/app/sparkle-design.css
  • カスタム出力先: -o オプションで指定可能
  • 実行場所を基準として相対パスで処理されます

開発

セットアップ

# 依存関係をインストール
npm install

# パッケージをローカルでリンク
npm link

開発用コマンド

# テスト実行
npm test

# テスト監視モード
npm run test:watch

# Lint実行
npm run lint

# Lintエラーを自動修正
npm run lint:fix

# コードフォーマット
npm run format

# フォーマットチェック
npm run format:check

CLI実行テスト

# デフォルト設定でテスト
sparkle-design-cli

# ヘルプ表示
sparkle-design-cli --help

# カスタムパスでテスト
sparkle-design-cli -c test-config.json -o test-output.css

ライセンス

MIT License - 詳細は LICENSE ファイルを参照してください。