Skip to content
/ wml Public
forked from wix-incubator/wml

An alternative to symlinks that actually copies changed files from source to destination folders

License

Notifications You must be signed in to change notification settings

Nico-Guyon/wml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tangible symlinks

Wml listens to changes in some folder (using Watchman) and copies changed files into another folder.

Why?

Sometimes symbolic linking just isn't enough. Github has more than 10K issues with the words "support for symlinks" in them.

Two examples I've encoutered were: React Native's packager doesn't support them and Webpack cannot find linked modules dependencies (working around this has issues of its own). A lot of people resolve to working directly from the node_modules folder in these cases, but a. if your package is required by two projects on which you are working simultaneously, your stuck, and b. it just feels wrong.

Wml makes use of Facebook's ultra-fast Watchman to watch for changes in your source folder and copy them (and only them) into your destination folder.

Wml is a CLI tool that works pretty much like ln -s. You first set up your links by running the wml add command and then run the wml service (wml start) to start listening. That's it!

Install

npm install -g wml

Usage

# add the link to wml using `wml add <src> <dest>`
wml add ~/my-package ~/main-project/node_modules/my-package
# start watching all links added
wml start

Commands

add

wml add <src> <dest> (or wml a)

Adds a link.

wml will not start listening to changes until you start it by running wml start.

Eace link is given an unique id, you can see all links and their ids by running wml list.

rm

wml rm <linkId>

Removes a link.

start

wml start (or wml s)

Starts wml.

It first copies all watched files from source to destination folder and then waits for new changes to happen.

list

wml list (or wml ls)

Lists all links.

Shows link's id, state and source/destination folders.

enable

wml enable <linkId> (or wml en)

Enables a link.

disable

wml disable <linkId> (or wml d)

Disables a link.

Great for re-using old links without having to type them over and over again.

About

An alternative to symlinks that actually copies changed files from source to destination folders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%