Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sync-copies

Zhouzi40MIT1.0.0

Assistant to keep duplicated copies of a file identical, aka the ultimate copy/paste tool.

duplicates, synchronize, copies, copy, files, links

readme

sync-copies

Assistant to keep duplicated copies of a file identical, aka the ultimate copy/paste tool.

Installation

npm install sync-copies

Usage

sync-copies comes in two forms:

Node module

const { serve } = require("sync-copies");
const folders = ["./packages/a", "./packages/b"];
const match = "*.md";

serve({
  folders,
  match
});

The above example will open a browser listing all files matching "*.md" in the folders "./packages/a" and "./packages/b".

serve(opts: { folders: string[], match: string, port?: number })

  • folders: the list of folders to look into.
  • match: a glob used to match files inside the provided folders.
  • port (optional, defaults to an available port): the port the node server should listen to.

CLI

Usage
    $ sync-copies <folders>

Options
    --match, -m Files to match in the provided folders.
    --port, -p The port to listen to.
    --open, -o Open the app in the default browser.

Examples
    $ sync-copies ./packages/package-a/ ./packages/package-b/ --match '*.md'

The above example will open a browser listing all files matching "*.md" in the folders "./packages/a" and "./packages/b".

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

  • Fix performance issue with diff generation.

[1.0.0] - 2020-03-31

  • Initial release