andrewdavey/vogue
关于
Save a CSS file, watch your web browser automatically reload it!
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Vogue
Vogue creates a real-time link between your web browser and your file system. When you save a CSS file, used by the HTML page in your browser, Vogue will make the browser reload the stylesheet. Only the stylesheet is reloaded, not the entire page, making it work even for very dynamic/ajax pages.
Vogue is all javascript. It runs a server on Node.js, which will watch the file system. The server accepts WebSocket connections from the client code (which uses socket.io). The client javascript can be loaded into a HTML page using a single script tag.
Install using npm
Make sure you have Node.JS and npm installed.
Then run:
npm install vogue -g
Usage
Run the Vogue server.
vogue --port 8001 /path/to/website
--port : The port used for Vogue's HTTP server. Optional, defaults to 8001.
--rewrite : A rule in the form of "regexp:replacement" (e.g. "v[0-9]/(.*)$:files/$1" ) to rewrite urls to filesystem paths.
Submatches such as $1 will probably need to entered in your shell as $1 to escape the $.
Open http://localhost:8001/ to see instructions for loading the Vogue client into your web pages.
Demo
Vogue runs a separate HTTP server to the one running your website. To run the demo website, for example, do something like this first:
cd demo
python -m SimpleHTTPServer
Then, from another terminal session, run Vogue:
vogue demo
Open http://localhost:8000 (or whatever the port used by your web server is) to view the demo index page. The demo page has the Vogue client javascript already included. So it will connect to the Vogue server and be watching the two CSS files used by the page.
Try editing the CSS files in the demo/styles directory. Whenever you save, you will see the
browser update the reflect the changes made. This is done without reloading the entire page.
Copyright © 2011 Andrew Davey ([email protected])
探索相关项目
加载中…