Hi,
I've been using Orbited (which as you know, relies on
js.io) for quite
some time now but this is the first time I'm making adjustments in the
javascript source, previously i've only modified the python code.
Basically I am wondering the correct syntax for jsio_compile. I'm
using the Makefile/pkg code from both the official orbited2 (https://
github.com/mcarter/orbited2/blob/master/daemon/orbited2/js_src/
Makefile and
https://github.com/mcarter/orbited2/blob/master/daemon/orbited2/js_src/Orbited2.pkg)
with latest jsio_compile from github.
I've also tried fairfieldts version on
https://github.com/fairfieldt/orbited2/blob/master/daemon/orbited2/js_src/Makefile
and
https://github.com/fairfieldt/orbited2/blob/master/daemon/orbited2/js_src/Orbited2.pkg
My problem is most likely with how I use jsio_compile (I'm assuming
I'm doing something weird). I'm standing in the js_src folder (with
Orbited.js, Makefiles and all) and getting errors that it can find the
Orbited2.js:
Makefile:
{
"root": "Orbited2",
"externalName": "Orbited2",
"transports": ["csp", "websocket"],
"environments": ["browser"],
"additional_dependancies": [ ]
}
Compiling:
jsio_compile Orbited2.pkg -j jsio-3.3alpha -o ../static/Orbited2.js -d
> (node) process.compile should not be used. Use require('vm').runInThisContext instead.
>
> Error loading module:
> requested: ..Orbited2
> from: ./<initial file>
> full request: .Orbited2
>
>
> node.js:195
> throw e; // process.nextTick error, or 'error' event on first tick
> ^
> Error: ./<initial file>:
> current directory: /home/niklas/orbited2/daemon/orbited2/js_src
> looked in:
> ./../Orbited2.js
> Import Stack:
>
> Error: requested import (..Orbited2) not found.
Basically it appears to be searching for "../Orbited.js". If I create
copy of Orbited.js and place it in the parent folder the compilation
itself works, but that messes up the Orbited.js file since the paths
get's all wrong, making the browser think that Orbited2.js doesn't
exist (Could not load ../Orbited2.js when you load Orbited2.js)
I'm most certain I'm doing something wrong here in the configuration,
but If anyone could point me in the right direction I would be most
grateful
Regards,
Niklas