assetreload-1.1
توضیحات
Broadcast changes in your assets to the browser.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | assetreload-1.1 |
| نام | assetreload |
| نسخه کتابخانه | 1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Callum Jefferies |
| ایمیل نویسنده | callum@callumj.co.uk |
| آدرس صفحه اصلی | https://github.com/callum-/assetreload |
| آدرس اینترنتی | https://pypi.org/project/assetreload/ |
| مجوز | MIT License |
AssetReload
===========
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
نحوه نصب
نصب پکیج whl assetreload-1.1:
pip install assetreload-1.1.whl
نصب پکیج tar.gz assetreload-1.1:
pip install assetreload-1.1.tar.gz