Skip to main content

Broadcast changes in your assets to the browser.

Project description

AssetReload uses WebSockets to broadcast asset changes to the browser.

## Installation

Install with pip:

pip install assetreload

If you don’t have it installed, use easy_install instead.

## Usage

Once setup, cd into a directory you would like to monitor for changes and start the server by running assetreload.

There are optional arguments:

  • path defines the directory to monitor (defaults to current directory)

  • port the port on which to start the server (defaults to 8888)

E.g.

assetreload –path=~/mysite/ –port=8889

### In the browser

Make a copy of assetreload.js in your project, and include the following:

<script id=”assetreload” src=”assetreload.js”></script>

Changes to the current document or JavaScript trigger a page reload, but images and CSS can happen without. Configure your port to match the above by using data-port on the script tag.

You can automatically generate assetreload.js into a directory of your choosing by running:

assetreload genscript

## Changelog

### Version 1.1

  • Added: error handling for incorrectly configured ports

  • Removed: need to specify a list of files to watch - files are now handled automatically

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assetreload-1.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file assetreload-1.1.tar.gz.

File metadata

  • Download URL: assetreload-1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for assetreload-1.1.tar.gz
Algorithm Hash digest
SHA256 4b921cfd7de69b8f1e2279234beef307df0d92c86c8a2b3a7a4d44087c36db68
MD5 287ded38bbcfb397a9490c7d9910f1f4
BLAKE2b-256 86238a6cb0f8a8f094968c304b5f4e3b3d2a85b851b0388642b8ca3475af6b2f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page