I would like to try working on the cloud code on VSC and take advantage of the abilities it has.
But it won't recognize the require("moduleName").
Is there a way to fix that?
Could you try using the commonjs style require here?
To change the require setting (this is the only current setting) you can place require = commonjs; at the top of your script and then use that style of module acquisition.
To call the module itself as well as inherent functions you will do the following:
var theFirstModule = require("ModuleShortCode");
We call functions via dot notation.
Hope this helps, Patrick.
This is probably a very long shot, but is there a way to have Visual Studio recognise/auto-complete GameSparks Cloud Code API classes and functions?
Patrick, does this mean Cloud Code supports CommonJS style require with that option set? Is this documented somewhere?
Thanks, The GameSparks API autocomplete works, But I can't get autocomplete for modules by using the require("moduleName").
I've added the plugins SpectateModeManager commonjs and requirejs and modules and still nothing, I guess I need to set some .tern-project settings for it right? what exactly do I need to do now?
How do I make the autocomplete work with modules?...