• Stars
    star
    272
  • Rank 151,235 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 14 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Save a CSS file, watch your web browser automatically reload it!

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])

More Repositories

1

immutable-devtools

Chrome Dev Tools custom formatter for Immutable-js values
JavaScript
661
star
2

postal

Email sending for asp.net mvc using the view engine system to render emails.
C#
539
star
3

cassette

Manages .NET web application assets (scripts, css and templates)
C#
536
star
4

NotFoundMvc

Provides a user-friendly '404' page whenever a controller, action or route is not found in your ASP.NET MVC3 application. A view called NotFound is rendered instead of the default ASP.NET error page.
C#
92
star
5

immutable-object

JavaScript immutable object
JavaScript
30
star
6

knapsack

Project moved to https://github.com/andrewdavey/cassette
JavaScript
24
star
7

samples

Sample code for blog posts
JavaScript
22
star
8

Bandage

Dynamically add properties to classes. Ideal for view models in asp.net mvc.
JavaScript
12
star
9

coffeescript-vs

Visual Studio support for the wonderful CoffeeScript language
JavaScript
11
star
10

gulp-typescript

Compile TypeScript to JavaScript
JavaScript
10
star
11

expresscss

Automatically reload stylesheets in all web browsers as soon as a CSS file changes
C#
9
star
12

ravendb-migrations

A migrations library for RavenDB
C#
8
star
13

hotmod

HTML Output Modification Module for ASP.NET
C#
8
star
14

reference-application

MileageStats with mobile experiences
C#
8
star
15

FluentTest

A simple fluent API for writing unit tests using xunit.net
C#
7
star
16

magic

Magic Automatically Generates Incidental Code
C#
7
star
17

witness

JavaScript
7
star
18

wootstrap

A starting point for any reasonably well written asp.net mvc web application
JavaScript
5
star
19

cdncatalog

JavaScript
4
star
20

andrewdavey.github.com

An home for all things Andrew Davey
JavaScript
4
star
21

safarisnippets

Capture snippets while on sales safari
JavaScript
2
star