Guide to packaging Q-CTRL software

Q-CTRL has two types of packages:

  1. Public
  2. Private

Packages MAY be hosted publicly or privately on sites such as PyPI, npm and Docker Hub.

All packages MUST be packaged the same way for each language to ensure consistency and auditability.

# JavaScript

JavaScript packages MUST be packaged using the npm package manager under the qctrl org. Use the package.json template when creating a new JavaScript package.

# Module formats

All npm packages should support ESM, CJS and UMD, this allows our package to be consumed by numerous different consumers. ESM should be the preferred method of module choice for most applications for its simple sugar syntax (imports & exports), tree-shakeability to reduce app bundle size, improved asyncronous code and progressive web support allowing apps to decide on the right level of polyfilling.

Tools we use for generating module formats are webpack for web applications and rollup.js for libraries.

# Python

Python packages MUST be packaged using the Poetry packaging and dependency management tool. Use the pyproject.toml template when creating a new Python package.