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

web-sync-watcher

v1.0.0

Published

Real-time file synchronization tool for WEB projects with locale directory support

Readme

WEB Sync Watcher

Real-time file synchronization tool for WEB projects with locale directory support.

Features

  • 🔄 Real-time sync: Watches for file changes and syncs automatically
  • 🗺️ Locale support: Automatically moves files to [locale] directories
  • Fast: Efficient file copying with intelligent diff handling
  • 📊 Detailed stats: Shows synchronization timing and performance metrics
  • 🔧 Configurable: Customizable paths and exclusion rules
  • Verification: Validates that files are in correct locations

Installation

npm install -g web-sync-watcher
# or
yarn global add web-sync-watcher

For local installation in a project:

npm install --save-dev web-sync-watcher
# or
yarn add -D web-sync-watcher

Quick Start

# Start the watcher with default paths
web-sync start

# Start with custom paths
web-sync start \
  --source-dir ../my-web \
  --temp-dir ../my-temp \
  --diff-dir ../my-diff

# Initialize sync once (without watcher)
web-sync init

# Verify sync results
web-sync verify

Default Directory Structure

../.langfuse-3.71.0/    # Source directory (original Langfuse code)
../.temp/               # Temporary directory (built code)
../web_update/          # Diff directory (modified files)

Commands

start

Start the real-time synchronization watcher.

Options:

  • --source-dir: Source directory path (default: ../.langfuse-3.71.0)
  • --temp-dir: Temporary directory path (default: ../.temp)
  • --diff-dir: Diff directory path (default: ../web_update)
  • --skip-dirs: Comma-separated directories to skip
  • --exclude-move-dirs: Directories to exclude from locale move
  • --exclude-move-files: Files to exclude from locale move
  • --quiet: Reduce console output
  • --verbose: Increase console output

init

Initialize sync once (without starting watcher).

Options:

  • --source-dir: Source directory path
  • --temp-dir: Temporary directory path
  • --diff-dir: Diff directory path

verify

Verify the sync result.

Options:

  • --temp-dir: Temporary directory path

API Usage

You can also use the module programmatically:

const { start } = require('web-sync-watcher');

start({
  sourceDir: '../.langfuse-3.71.0',
  tempDir: '../.temp',
  diffDir: '../web_update',
  skipDirs: ['node_modules', '.git'],
  excludeMoveDirs: ['/api'],
  excludeMoveFiles: ['_app.tsx'],
  quiet: false,
  verbose: true
});

Locale Directory Logic

The tool automatically handles file movement to [locale] directories:

  1. /web/src/app/layout.tsx/web/src/app/[locale]/layout.tsx
  2. /web/src/pages/*/web/src/pages/[locale]/* (excluding /api and _app.tsx)

Skipped Directories

By default, these directories are skipped:

  • node_modules, .git, .vscode, .idea
  • dist, build, coverage
  • .next, .nuxt, .temp

Requirements

  • Node.js >= 14.0.0
  • npm or yarn

License

MIT