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

@c-time/frelio-dependency-map

v1.4.1

Published

Type definitions and utilities for frelio dependency map files

Readme

@c-time/frelio-dependency-map

Frelio SSG の依存マップ(dependency-map)の型定義とユーティリティ。


概要

依存マップは、各出力ファイルがどのソースファイル(テンプレート、コンテンツタイプ定義、コンテンツデータ)に依存しているかを追跡する。これにより、ソースファイルの変更時に影響を受ける出力のみを再生成する差分ビルドが可能になる。

ランタイム依存なし。


インストール

npm install @c-time/frelio-dependency-map

使用例

import {
  createFrelioDependencyMap,
  setDependencies,
  findAffectedOutputs,
  mergeFrelioDependencyMaps,
  isFrelioDependencyMap,
} from '@c-time/frelio-dependency-map'
import type { FrelioDependencyMap } from '@c-time/frelio-dependency-map'

// 依存マップの作成
let map = createFrelioDependencyMap()

// 出力ファイルの依存を設定
map = setDependencies(map, '/news/hello.html', [
  'content_types/news.json',
  'templates/news/detail/index.html',
  'contents/published/news/hello.json',
])

// ソースファイル変更時に影響を受ける出力を検索(glob パターン対応)
const affected = findAffectedOutputs(map, 'templates/news/detail/index.html')
// => ['/news/hello.html']

// 複数マップのマージ
const merged = mergeFrelioDependencyMaps(map1, map2)

API

| 型 | 説明 | |----|------| | FrelioDependencyMap | 出力パス → 依存パス配列のマッピング | | OutputPath | 出力ファイルパス | | DependencyPath | 依存ファイルパス(glob パターン対応) | | DependencyPathPrefix | 依存パスのプレフィックス定数(CONTENT_TYPES, TEMPLATES, CONTENTS) | | ValidationResult / ValidationError | バリデーション結果 |

関数

| 関数 | 説明 | |------|------| | createFrelioDependencyMap() | 空の依存マップを作成 | | setDependencies(map, output, deps) | 出力ファイルの依存を設定 | | removeDependencies(map, output) | 出力ファイルの依存を削除 | | getDependencyPaths(map, output) | 出力ファイルの依存パスを取得 | | getOutputPaths(map) | 全出力パスを取得 | | getAllDependencyPaths(map) | 全依存パスを取得 | | findAffectedOutputs(map, changed) | 変更されたファイルに影響を受ける出力を検索 | | mergeFrelioDependencyMaps(...maps) | 複数の依存マップをマージ | | isFrelioDependencyMap(value) | 型ガード | | validateFrelioDependencyMap(value) | バリデーション |


ライセンス

MIT