pyramid_webpack package

Module contents

pyramid_webpack

class pyramid_webpack.StaticResource(path)[source]

Bases: object

Wrapper around a filepath or asset path

classmethod create(path, root_package)[source]

Create a StaticResource, setting the package if needed

open()[source]

Open a stream object to the resource data

class pyramid_webpack.Webpack(request, name='DEFAULT')[source]

Bases: object

Wrapper object for the public webpack API

get_bundle(bundle_name, extensions=None)[source]

Get all the chunks contained in a bundle

stats[source]

Load and cache the webpack stats file

class pyramid_webpack.WebpackState(settings, root_package_name='pyramid_webpack', name='DEFAULT')[source]

Bases: object

Wrapper for all webpack configuration and cached data

load_stats(cache=None, wait=None)[source]

Load and cache the webpack-stats file

pyramid_webpack.get_webpack(request, name='DEFAULT')[source]

Get the Webpack object for a given webpack config.

Called at most once per request per config name.

pyramid_webpack.includeme(config)[source]

Add pyramid_webpack methods and config to the app