jagenjo / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
6.59k stars 703 forks source link

Change global compiler.jar reference to local #23

Open kriffe opened 6 years ago

kriffe commented 6 years ago

Since google-closure-compiler is included in package.json as a dependency the global reference still remaining in the old python build script can be removed (if python build is still beeing used?)

https://github.com/jagenjo/litegraph.js/blob/master/utils/builder.py#L7

Should be replacable with reference to local node_modules. Needs testing first

compiler_path = "node_modules/google-closure-compiler/compiler.jar"
jagenjo commented 6 years ago

all my scripts rely on that version (and I like to leave users the freedom to not use grunt if they dont want to), maybe when executing the grunt file it could add it to the system somehow so it doesnt matter where it is located.

kriffe commented 6 years ago

@jagenjo But if its a specific version of the compiler that is important it should be specified in the package.json as a locked down version, otherwise we might get different output on each build (https://github.com/jagenjo/litegraph.js/blob/master/package.json#L32)

Since my latest pull request i bundled grunt internally so the user wont need to install it (another devdependency.. sorry). But everything is hidden inside npm now, so you only need "npm run build" to handle the process. Or do you mean that the user should not need to use "npm install" at all in the project?

Im unsure if its possible to make global installs from npm in a safe/structured way. I think its better that you require a npm install and that your python scripts point locally (your other projects will be unaffected of that)

NateScarlet commented 5 years ago

The python build script not work on windows I can use npm run build, but it comes with a lot of diff, see #67 @kriffe

jagenjo commented 5 years ago

the diff could be because my python script uses the /utils/deploy_files.txt files list to pack together, if the npm build uses an old copy then the included files wont be the same.