Open cboulanger opened 6 years ago
The idea here is that any browserify-able or webpack-able NPM package can be trivially added to a desktop qx app, and used. That would greatly expand the available capabilities for a qx app.
Great idea. Would make adding npm packages much more easy Needs an option to update the Version in some kind
@derrell and I have talked about how to most efficiently add external non-qooxdoo libraries to qooxdoo applications. Here is what we came up with. We add two commands:
1)
qx add script path/to/script.js [--path=<resource path, defaults to source/resource/js>]
: adds a script to the application setup (copying it into resources, adapting theexternalResources
in Manifest.json) 2)qx add npm-package <npm package name> [—entry=<entry script, defaults to browser.js>]
, which does the following:qx add script <bundle file>
for example, if you need a JsonRpc client (that was the initial question), you could do
qx add npm-package raptor-client
to install https://github.com/LinusU/raptor-client and then, in your qooxdoo code, you can dolet raptor = window.raptor_client; let client = new raptor(url)...