create helper that generate the script code for requirejs