New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portalscript Category for require() #169

fiurthorn opened this Issue Jun 21, 2018 · 4 comments


None yet
3 participants

fiurthorn commented Jun 21, 2018

require() a script with category "util/lib" and the Name BigNum as require("util/lib/BigNum").


This comment has been minimized.


FabianTe commented Jun 22, 2018

Is it just me or does this need further information? What do you mean?


This comment has been minimized.

fiurthorn commented Jun 23, 2018

If you have a look to my transpiling support, you see I Set the PortalScriptCategory to the source directory.

This keep the original Import path and i über not to erweitern the Import require Name.


This comment has been minimized.


tineheller commented Jun 27, 2018

So let's say, there is a portalScript with name BigNum and category util/lib on server.
When you want to require this portalScript in another portalScript on server, you have to use


It is not possible to add a path in require, like so:


And unfortunately it will not be possible to add this feature to our require function.
Was this your request?


This comment has been minimized.

fiurthorn commented Jun 27, 2018

fix this in the extention to rewrite the the name from toolbox/lib/posdata to toolbox.lib.posdata.

The request is to have a bigger namespace and less rename the original imports.


import { xml2json, json2xml } from "toolbox/lib/posdata";


var posdata_1 = require("toolbox.lib.posdata");

@fiurthorn fiurthorn closed this Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment