# Path: webpack/conf.py
# class Conf(conf.Conf):
#     OUTPUT_ROOT = None
#     STATIC_URL = None
#     OUTPUT_DIR = 'webpack_assets'
#     CONFIG_DIRS = None
#     CONTEXT = None
#     BUILD_URL = 'http://127.0.0.1:9009/build'
#     WATCH = False
#     AGGREGATE_TIMEOUT = 200
#     POLL = None
#     HMR = False
#     CACHE = True
#     CACHE_DIR = None
#     MANIFEST = None
#     USE_MANIFEST = False
#     MANIFEST_PATH = None
#     MANIFEST_SETTINGS = {
#         # Force the compiler to connect to the build server
#         'USE_MANIFEST': False,
#         # Ensure that the server does not add a hmr runtime
#         'HMR': False,
#     }
#     def get_path_to_output_dir(self):
#     def get_public_path(self):
# 
# Path: webpack/compiler.py
# def webpack(config_file, context=None, settings=None, manifest=manifest_reader, compiler=build_server):
#     use_manifest = conf.settings.USE_MANIFEST
# 
#     # Allow the USE_MANIFEST setting to be overridden when populating the manifest
#     if settings:
#         use_manifest = settings.get('USE_MANIFEST', use_manifest)
# 
#     if use_manifest:
#         return manifest.read(config_file, context)
# 
#     return compiler.build(
#         config_file=config_file,
#         extra_context=context,
#         setting_overrides=settings,
#     )


import os
from flask import Flask, render_template
from webpack.conf import settings
from webpack.compiler import webpack

DEBUG = True

BASE_DIR = os.path.dirname(os.path.abspath(__file__))

settings.configure(
    # The root directory that static assets are located in
    STATIC_ROOT=os.path.join(BASE_DIR, 'static'),
    # The url that STATIC_ROOT is served from
    STATIC_URL='/static/',
    CONFIG_DIRS=(
        os.path.join(BASE_DIR, '..'),
    ),
    # Turn on source watching in development
    WATCH=DEBUG,
    # Turn on hmr in development
    HMR=DEBUG,
    CONTEXT={
        'DEBUG': DEBUG
    },
)


# Path: webpack/conf.py
# class Conf(conf.Conf):
#     OUTPUT_ROOT = None
#     STATIC_URL = None
#     OUTPUT_DIR = 'webpack_assets'
#     CONFIG_DIRS = None
#     CONTEXT = None
#     BUILD_URL = 'http://127.0.0.1:9009/build'
#     WATCH = False
#     AGGREGATE_TIMEOUT = 200
#     POLL = None
#     HMR = False
#     CACHE = True
#     CACHE_DIR = None
#     MANIFEST = None
#     USE_MANIFEST = False
#     MANIFEST_PATH = None
#     MANIFEST_SETTINGS = {
#         # Force the compiler to connect to the build server
#         'USE_MANIFEST': False,
#         # Ensure that the server does not add a hmr runtime
#         'HMR': False,
#     }
#     def get_path_to_output_dir(self):
#     def get_public_path(self):
# 
# Path: webpack/compiler.py
# def webpack(config_file, context=None, settings=None, manifest=manifest_reader, compiler=build_server):
#     use_manifest = conf.settings.USE_MANIFEST
# 
#     # Allow the USE_MANIFEST setting to be overridden when populating the manifest
#     if settings:
#         use_manifest = settings.get('USE_MANIFEST', use_manifest)
# 
#     if use_manifest:
#         return manifest.read(config_file, context)
# 
#     return compiler.build(
#         config_file=config_file,
#         extra_context=context,
#         setting_overrides=settings,
#     )


# Path: examples/flask/example.py
import os
from flask import Flask, render_template
from webpack.conf import settings
from webpack.compiler import webpack


DEBUG = True

BASE_DIR = os.path.dirname(os.path.abspath(__file__))

settings.configure(
    # The root directory that static assets are located in
    STATIC_ROOT=os.path.join(BASE_DIR, 'static'),
    # The url that STATIC_ROOT is served from
    STATIC_URL='/static/',
    CONFIG_DIRS=(
        os.path.join(BASE_DIR, '..'),
    ),
    # Turn on source watching in development
    WATCH=DEBUG,
    # Turn on hmr in development
    HMR=DEBUG,
    CONTEXT={
        'DEBUG': DEBUG
    },
)


app = Flask(__name__)