Is it possible to use generic js modules with native response? A use case is the exchange of logic between a mobile and web version of a response project.
Ok, I'm new to this, but I think I figured out how to include js code. I did not need to add anything to the standard response to my own installation.
Create a code library:
//library.js exports.foo = function() { //Do stuff here return "Here"; }
Import to another js file:
var lib = require("./library.js"); var myString = lib.foo();
I found the information from this blog post:
http://0fps.net/2013/01/22/commonjs-why-and-how/