playcanvas / playcanvas-rest-api-tools

A set of tools to use with the PlayCanvas REST API for common jobs such as downloading a build and archiving a project
MIT License
23 stars 7 forks source link

Refactor to executable bin that can be called from other projects #34

Open vmwxiong opened 2 years ago

vmwxiong commented 2 years ago

Not sure if this is something y'all are interested in doing, but I've set up my project to have a fork of playcanvas-rest-api-tools as an npm dependency, where it exports a bin so that I can do things like this:

  "scripts": {
    "download": "playcanvas-rest download-project",
  },

Currently have it set up so that it reads from a playcanvas-config.json in the parent project directory, in lieu of the config.json used here.

At the very least, turning it into an executable makes it easier to use as just a global cli tool as well.

yaustar commented 2 years ago

Yeah, I've been thinking about how to refactor this actually so that you can combine different transformations on the build. Eg adding CSP rules and then turning it into a one page html documentation.

Turning it into a binary is not something I've considered before so will keep that in mind