playcanvas / playcanvas-sync

Real-time synchronization of files between PlayCanvas and your local machine
https://playcanvas.com/
MIT License
75 stars 19 forks source link

Add sub directory option to for pc-sync to pull and push from #34

Closed yaustar closed 2 years ago

yaustar commented 2 years ago

This is so that there's a 'clean' folder for pc-sync to use for the PlayCanvas project that doesn't have node_modules, package.json etc files in a PLAYCANVAS_USE_CWD_AS_TARGET: 1 setup. It will just have the files from the PlayCanvas project

The setup would have ~/.pcconfig as

{
  "PLAYCANVAS_API_KEY": "XXXXXX",
  "PLAYCANVAS_USE_CWD_AS_TARGET": 1
}

In the project (CWD), the pcconfig.json would be

{
  "PLAYCANVAS_INCLUDE_REG": "Scripts/.*|.*\\.(html|js|json)$",
  "PLAYCANVAS_BRANCH_ID": "XXXXXX",
  "PLAYCANVAS_PROJECT_ID": XXXXXX,
  "PLAYCANVAS_CWD_SUBDIR": "src"
  "PLAYCANVAS_VERBOSE": 1
}

And pc-sync would push and pull files from the CWD/src directory