def create_lua_script(plugins):
    """ Return script template filled up with plugin javascript data.

    :rtype: str

    """
    lua_template = pkg_resources.resource_string('detectem', 'script.lua')
    template = Template(lua_template.decode('utf-8'))

    javascript_data = to_javascript_data(plugins)

    return template.substitute(js_data=json.dumps(javascript_data))
Return script template filled up with plugin javascript data.

    :rtype: str