qooxdoo / qooxdoo-compiler

Compiler for Qooxdoo, 100% javascript
MIT License
36 stars 23 forks source link

Compiler should fallback to globally installed qooxdoo-sdk if no library defines the "qx" namespace #197

Closed cboulanger closed 6 years ago

cboulanger commented 6 years ago

Say I have a contrib to which I do not want to add the whole NPM metadata/packages overhead, but instead I have all necessary npm packages (qxcompiler, qooxdoo-sdk) installed globally via NVM and NPM. Since the path to the qooxdoo-sdk framework folder will depend on the node version used and other factors, it cannot be hardcoded. The location of the framework folder can be resolved from within a running node script via let pathToFramework = require.resolve('qooxdoo-sdk') + "/framework";

Therefore, it seems to be a good idea to implement a fallback mechanism by which the compiler falls back on this path if none of the libraries in compile.json provides the qx namespace.

cboulanger commented 6 years ago

Alternative: execute npm link qooxdoo-sdk in the project and put the path node_modules/qooxdoo-sdk/framework into compile.json's libraries section. So the fallback is not necessary. Closing.