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

pgmjah-filesync

v1.0.8

Published

Synchronize files between directories

Downloads

4

Readme

filesync README

FileSync will keep files synchronized between src and dest locations. It can also clone git repositories before synchronizing, and rename files.

Note: This has never been run/tested on any Mac/UNIX box. My guess is it will not work, as FileSync uses the Node file System extensively, and I'm sure there are major differences in how the calls should be made.

Install/Run

  • Install: npm -g pgmjah-filesync
  • Run: filesync <fsconfig.json>

Note: You can create a default 'fsconfig.json' file in the current directory by running filesync, then type 'mkdef' and enter.

Features

  • Clone git repositories
  • Rename files
  • Keep files synchonized between source/destination directories.
  • Simple to configure.

FileSync Configuration

  • Add file(s) called "fsconfig.json" (see below) to the folders you open, or are part of your workspace.

fsconfig.json

  • You can have multiple fsconfig.json files, the extension will find them in your workspace/folders and load each one.

The FileSync config file is a json object with the following layout:

{
	"configs":
	[
		{
			"name":"sample_sync_config",
			"enabled":true,
			"rename":
			[
				{
					"src":"c:/path/to/file/file.ext",
					"name":"new_name.ext"
				}
			],
			"git":
			[
				{
					"src":"https://github.com/gitrepo/gitrepo.git",
					"dest":"c:/clone/to/this/location"
				}
			],
			"sync":
			[
				{
					"src":"c:/some/source/folder",
					"dest":"c:/some/dest/folder",
					"files":
					[
						"./syncFileOnly.ext",
						"./child_dir/otherFileOnly.ext"
					],
					"ignore":
					[
						"folder1/relative/to/src",
						"folder2/relative/to/src"
					],
					"bidir":true
				}
			]
		}
	]
}
  • configs - You can have an array of config blocks, each specifying their own syncing actions.
  • name - just an indentifier, has no intrinsic meaning.
  • enabled - activate/ignore this block when starting.
  • rename - array of objects specifying what files you want renamed before syncing (can be a single object, if just one).
    • src - the file you want to rename.
    • name - what you want the file renamed to. You can specify '*' as the filename to just change the extension...like "*.txt_fsync_".
  • git - array of git repositories to be cloned into a specified location (can be a single object, if just one).
    • src - location of the git repository.
    • dest - where to clone the src repos into.
  • sync - array of objects specifying what directories you want synchronized where (can be a single object, if just one).
    • src - the source directory to syncronize.
    • dest - the destination directory to keep synchronized.
    • files - array of file names you want to sync (can be a single object, if just one). If not present will sync all files in src.
    • ignore - array of relative paths to src to be ignored when syncing (can be a single object, if just one).
    • bidir - bidirectional synchronization...that is, files will be removed from destination if they don't exist in the source.

Release Notes