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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@piotar/pkg-sync

v1.7.1

Published

A utility for synchronization multiple packages, without any symlinks and any changes in projects(package.json, etc.).

Downloads

57

Readme

pkg-sync

GitHub package.json version npm (scoped) node-current (scoped) NPM

A utility for synchronization multiple packages, without any symlinks and any changes in source projects(package.json, etc.).

It is a simple application to watching and copying files from project to another project using CLI.

Installation

npm install -g @piotar/pkg-sync

Usage

In some cases, we can not use symbolic links for dependencies. The solution is to copy build files to our project and test it locally.

Example

We have a main project (App) and 2 dependencies (Ui and Store) with difference locations (this is not monorepository).

~
├── projects
│   └── App
│       ├── node_modules
│       ├── package.json
│       └── etc...
└── external
    ├── Ui
    │   ├── node_modules
    │   ├── package.json
    │   └── etc...
    └── Store
        ├── node_modules
        ├── package.json
        └── etc...

First of all, we need to add dependencies to pkg-sync.

  1. Go to directories ~/external/Ui and ~/external/Store.
  2. Run command pkg-sync add . with each directory.
  3. Go to ~/projects/App directory.
  4. Run command pkg-sync sync .. This will copy dependency files and start watching for changes.

That's it... Points 1-2 are only necessary for the first run.

Commands

add [options] [path]

Usage: pkg-sync add [options] [path]

Add package to sync

Arguments:
  path                  Path to package (path not set will be set to closest package.json)

Options:
  -n, --name <package>  Package name (override name from package.json)
  -f, --force           Override package
  -d, --dir [dirs...]   Directory to watch (override default values)
  -h, --help            display help for command

remove|rm [options] [packages...]

Usage: pkg-sync remove|rm [options] [packages...]

Remove package from sync

Arguments:
  packages           Package name (name set as "." will be set from closest package.json)

Options:
  -i, --interactive  Interactive mode (default: false)
  -a, --all          Remove all stored packages (default: false)
  -h, --help         display help for command

list|ls

Usage: pkg-sync list|ls [options]

Show all stored packages

Options:
  -h, --help  display help for command

validate [options] [path]

Usage: pkg-sync validate [options] [path]

Show coverage packages from project

Arguments:
  path                  Path to package (path not set will be set to closest package.json)

Options:
  -d, --depth [number]  Deep search of dependencies (default: 2, preset: 2)
  -h, --help            display help for command

sync [options] [path] [packages...]

Usage: pkg-sync sync [options] [path] [packages...]

Sync and watch packages in project

Arguments:
  path                  Path to package (path not set will be set to closest package.json)
  packages              Package name to sync

Options:
  --no-watch            Disable watch files after sync
  -i, --interactive     Interactive mode (default: false)
  -d, --depth [number]  Deep search of dependencies (default: 2, preset: 2)
  -h, --help            display help for command

update-check

Usage: pkg-sync update-check [options]

Check version of 'pkg-sync'

Options:
  -h, --help  display help for command

config

Usage: pkg-sync config [options] [command]

Config

Options:
  -h, --help         display help for command

Commands:
  set <key> <value>  Set config
  get [key]          Get config
  restore            Restore config to default
  help [command]     display help for command