Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
Bumped version number. Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonmoeller committed Sep 5, 2012
1 parent e3b87e5 commit d185098
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 13 deletions.
53 changes: 42 additions & 11 deletions README.md
Expand Up @@ -6,11 +6,11 @@ The stupid development server.
- Reloads browser on source-file change.
- Serves [CoffeeScript][coff], [Jade][jade], and [Stylus][styl] like a champ.
- Compiled output sent directly to browser for a pristine working directory.
- No caching so you're guaranteed to get the latest changes.
- No preprocessor caching so you're guaranteed to load the freshest code.

Built with [Connect][conn], [Socket.io][sock], [Commander.js][comm], and
[hound][houn]. Inspired by visionmedia's [serve][serv] and nodejitsu's
[http-server][hser].
Built with [Node.js][node] using [Connect][conn], [Socket.io][sock],
[Commander.js][comm], and [hound][houn]. Inspired by visionmedia's [serve][serv]
and nodejitsu's [http-server][hser].

Installation
------------
Expand Down Expand Up @@ -72,18 +72,18 @@ File extensions are taken literally. If you request `.jade`, you'll get Jade:
!!! 5
title Hello world
link(rel='stylesheet', href='foo.css')
script(src='/connect-reload.js')
script(src='connect-reload.js')
script(src='foo.js')
```

If you want the slightly-more-useful compiled html, request `.htm` or `.html`
If you want the slightly-more-useful compiled HTML, request `.htm` or `.html`
instead:

```
$ curl http://localhost:3000/foo.html
<!DOCTYPE html><title>Hello world</title><link rel="stylesheet" href="foo.css"><script src="/connect-reload.js"></script><script src="foo.js"></script>
<!DOCTYPE html><title>Hello world</title><link rel="stylesheet" href="foo.css"><script src="connect-reload.js"></script><script src="foo.js"></script>
```

Expand All @@ -92,18 +92,46 @@ Same goes for `.coffee` vs `.js` and `.styl` vs `.css`.
### Auto-reload

To enable automatic reloading of a page when a file in your project is created
or changed, simply include the virtual `/connect-reload.js` in your markup:
or changed, simply include the virtual `connect-reload.js` in your markup:

```
<!-- HTML -->
<script src="/connect-reload.js"></script>
<script src="connect-reload.js"></script>
// Jade
script(src='/connect-reload.js')
script(src='connect-reload.js')
```

The filename is magic, so the path doesn't matter:

```
// Also works!
script(src='../my/public/assets/dir/connect-reload.js')
```

### Nib

[Nib][nib] is made available to Stylus files. Just import it:

```
@import 'nib'
*
// Nib will add vendor prefixed variants
box-sizing: border-box
```

### Data URI Image Inlining

Inlining of images via `url()` is not enabled (this is a dev server after all),
but you may install [`node-canvas`][ncan] to get IE-friendly inlined gradients.

License
-------

Expand All @@ -130,13 +158,16 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[coas]: https://github.com/TrevorBurnham/connect-assets
[coas]: https://github.com/TrevorBurnham/connect-assets/
[coff]: http://coffeescript.org/
[comm]: http://visionmedia.github.com/commander.js/
[conn]: http://senchalabs.org/connect/
[houn]: https://github.com/beefsack/node-hound/
[hser]: https://github.com/nodeapps/http-server/
[jade]: http://jade-lang.com/
[ncan]: https://github.com/LearnBoost/node-canvas/
[nib]: http://visionmedia.github.com/nib/
[node]: http://nodejs.org/
[serv]: https://github.com/visionmedia/serve/
[sock]: http://socket.io/
[styl]: http://learnboost.github.com/stylus/
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "workit",
"version": "0.1.8",
"version": "0.2.0",
"description": "The stupid development server. Serves CoffeeScript, Jade, and Stylus like a champ. Reloads browser on source-file change.",
"keywords": ["assets", "serve", "static", "watch"],
"author": "Shannon Moeller <me@shannonmoeller.com> (http://shannonmoeller.com)",
Expand Down
2 changes: 1 addition & 1 deletion src/workit-cli.coffee
Expand Up @@ -3,7 +3,7 @@ commander = require 'commander'
path = require 'path'

# Arguments
commander.version('0.1.8')
commander.version('0.2.0')
.usage('[options] [dir]')
.option('-a, --address <string>', 'set hostname [localhost]')
.option('-f, --format <string>', 'connect logger format [dev]', 'dev')
Expand Down

0 comments on commit d185098

Please sign in to comment.