Package detail

msf-cli

rocwind138MIT1.2.5

My Sync Folders - sync files between folders based on watchman

watchman, sync

readme

msf-cli

msf(My Sync Folders) listens to changes between 2 folders and try to keep them in sync by copying changed files into the other folder. It's inspired by wml but different in following places:

  • you don't need to create links first, msf just does its job on launch
  • msf syncs folders in bi-direction

Install

msf depends on watchman to monitor file changes, please install watchman first.

npm install -g msf-cli

Usage

msf ~/my-package ~/my-project/node_modules/my-package use msf --help to see all supported options

.msfignore

a .msfignore file under source folder, follows .gitignore syntax can help to ignore files from being synced. since msf is based on watchman, a .watchmanconfig with below example contents can also help to ignore files:

{
  "ignore_dirs": ["node_modules"]
}

Why

Symlinks are not supported in react-native currently, check this thread. Copy files is almost the only option to develop a shared package for RN project, the reason we want it bi-directional is sometimes, editing native code in RN project (xcode/Android studio) is more convenient to try things out and we want the edits can be synced back to source package.

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.2.5 (2022-02-28)

Bug Fixes

  • deps: update dependency wait-ready to ^0.6.0 (4aaab67)

1.2.4 (2021-12-24)

Bug Fixes

  • serialize calls to watchman to avoid issues (54a2e3a)

1.2.3 (2021-08-18)

Bug Fixes

  • deps: update dependency fs-extra to v10 (8846c04)
  • deps: update wait-ready and chalk (e31d498)
  • deps: update yargs to v17 (506a3c1)

1.2.2 (2021-07-12)

Bug Fixes

  • use watch but not watch-project command to workaround issues (7d845bb)

1.2.1 (2021-06-16)

Bug Fixes

  • msf cannot handle sub folder ignores with ignore file in working dir (5451033)
  • msf should exit process even if cleanup failed (2ca285c)

1.2.0 (2021-05-20)

Features

  • search for .msfignore file by walking up parent directories of src (04a5037)

1.1.0 (2021-04-03)

Features

  • support using , in files option (2084fc7)

Bug Fixes

  • check of sync a folder to itself case and throw error (417ec9b)

1.0.0 (2021-04-03)

Features

  • add color to logs (5391e1f)
  • support include/exclude sync files and sync modes (d6ecd49)

Bug Fixes

  • ensure folders exsits first (7a8264a)
  • format the log and catch & ignore errors in cp/rm (7b7c4b6)
  • skip rm changed file (a608360)

0.0.1 (2021-03-28)

Features

  • initial implementation of the cli (2638bfa)