Browserify a single javascript entry point plus non-external
    dependencies into a single javascript file. Generates source maps
    in debug mode. Minifies the output in release mode.

    By default, it is not possible to ``require()`` any exports from the entry
    point or included files. If ``export_as`` is specified, any module exports
    in the specified entry point are exposed for ``require()`` with the
    name specified by ``export_as``.

def browserify_file(entry_point, output_file, babelify=False, export_as=None):
    """
    Browserify a single javascript entry point plus non-external
    dependencies into a single javascript file. Generates source maps
    in debug mode. Minifies the output in release mode.

    By default, it is not possible to ``require()`` any exports from the entry
    point or included files. If ``export_as`` is specified, any module exports
    in the specified entry point are exposed for ``require()`` with the
    name specified by ``export_as``.
    """
    from .modules import browserify

    if not isinstance(entry_point, str):
        raise RuntimeError('Browserify File compiler takes a single entry point as input.')

    return {
        'dependencies_fn': browserify.browserify_deps_file,
        'compiler_fn': browserify.browserify_compile_file,
        'input': entry_point,
        'output': output_file,
        'kwargs': {
            'babelify': babelify,
            'export_as': export_as,
        },
    }