DanRoscigno / watch_and_sync

Watch a directory for changes and sync files to a second dir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sync

This is a copy of sync.mjs from @FranciscoMoretti as decribed in his blog.

This syncs files on update from the docs dirs (docs/en/ and docs/zh/) into the dirs that Docusaurus expects to read from (docusaurus/docs/ and docusaurus/i18n/docusaurus-plugin-content-docs/current/) so that we can edit the files where they belong in local clones of the GitHub repo and see the results as files are saved in local runs of Docusaurus.

npm install
mkdir -p docs/en docs/zh
node sync.mjs --watch

About

Watch a directory for changes and sync files to a second dir


Languages

Language:JavaScript 100.0%