qooxdoo-archive / qooxdoo-cli

(deprecated, moved into qooxdoo-compiler) qx commandline
MIT License
4 stars 5 forks source link

Add project to node path #25

Closed hkollmann closed 6 years ago

hkollmann commented 6 years ago

To load project specific node modules during compile process it is necesary to have the path to the local node_modules in the search path of node. So it is possible to load a special node modul for compiling a special project.

For an example see compile-json.md.

There you get an description how to add sass support for mobile Projects.

hkollmann commented 6 years ago

You have something like that in one of the qxcompiler classes. Unfortunately it works not with shell scripts. The idea could be to replace this with RunScript and the node runscript package.

I can prepare an cChange request for qxcompiler if you like.

johnspackman commented 6 years ago

is that just batch files on Windows that it doesn't work with? AFAICR those sometimes need to be prefixed with cmd /c? It's been a while though

But yes please, that would be useful. Also, if you feel like having a go ( 😉 ) , that function in compile.js should be able to return a Promise (in which case the callback is expected to be ignored)

The disadvantage of this approach is that it doesn't work so well with the --watch option, and I wonder if we can come up with an effective way to do this without going down the route of either building yet-another-build-system (Grunt, brocolli, etc), but also avoiding requiring grunt. I'm going to start an issue in a minute to discuss this.

johnspackman commented 6 years ago

https://github.com/qooxdoo/qooxdoo-cli/issues/26