Skip to content

Instantly share code, notes, and snippets.

@cboulanger
Last active May 3, 2017 06:51
Show Gist options
  • Save cboulanger/4f41fc6d51db4c781922c2f5894b3b9a to your computer and use it in GitHub Desktop.
Save cboulanger/4f41fc6d51db4c781922c2f5894b3b9a to your computer and use it in GitHub Desktop.
Some first ideas for an API for qx-contrib support in the new javascript-based generator

using a pseudo-syntax here

please note: this are all ideas from the top of my head, I don't know the new generator at all, so please correct me where these ideas are redundant, unwise or infeasable

for contribution consumers

  • qx contrib list lists all available contributions on github with the topic 'qx-contrib' that are compatible with the current library, --all for all
  • qx contrib install <contrib name>: downloads the given contrib and adds its manifest to config.json. If is omitted, all contribs in config.json/jobs/libraries that have a github URL are downloaded.
  • qx contrib remove <contrib name>: removes the given contrib from the filesystem and from config.json
  • qx contrib update <contrib name>: updates the given contrib, --all to update all contribs to the latest compatible version

for contribution developers

  • qx contrib-dev list lists all available contributions on github tagged 'qooxdoo-contrib' with extended information
    • --qxversion <version>: filters by qooxdoo version
    • --filter <key>:<value>: filters by Manifest data
    • --format <format> format can be json  or html, the latter creates a page that can be deployed to the qooxdoo website as the current list of contribs
  • qx contrib-dev generate <params>: generates an contrib skeleton, prompts for information if not given by params
  • qx contrib-dev set-token <token>: sets the token for write access to the git repository the contrib lives in
  • qx contrib-dev init <params>: checks write access to the git repository and to its github pages, creates default landing page if none exists, prompts for information if not given by params
  • qx contrib-dev upload-api <params>: uploads the locally generated api-viewer to the contrib repository's github pages
  • qx contrib-dev upload-demo <params>: uploads the locally generated default demo to the contrib repository's github pages

Issues

  • how do deal with multiple versions
  • how do deal with forks
@johnspackman
Copy link

Please can you expand on qx contrib-dev list? Is this so that there can be contribs only for use by contrib developers as opposed to front-end developers?

Re versions and forks: could these be the same thing, eg the contrib name can include the github user name (eg johnspackman/UploadMgr) and also an optional syntax for branch (eg johnspackman/UploadMgr#mybranch) the user would be able to pick the fork to add.

This would be useful for supporting older versions of Qooxdoo - for example, I could have a johnspackman/qx-serverobjects#pre-v6 which supports 3.0.0 to 5.*, where the master branch supports master and 6.0.0+. It would be very cool if qx contrib install johnspackman/qx-serverobjects then figured out which branch to add based on the Qooxdoo version compatibility data stored in each branch and the version of Qooxdoo the app is using 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment