Does anyone have a working example of importing a local file as a module in Akshell?
I’ve uploaded DOMBuilder.js to my Akshell app, which according to the documentation should be compatible with the way Akshell’s modules work, but I just get an empty Object back when I use require('./DOMBuilder') in the Eval shell, while attempting to use it in a view function or template just gives me “Internal Application Error” with no stack trace.
Jonathan, I’ve ported your library to Akshell 0.2: DOMBuilder.js. In Akshell 0.3 you should just use
require('ak')as a first line.The main problem was in the line 970:
You can’t substitute the
exportsobject, you should put properties on it.