Permalink
Browse files

cleaned up extra blanks at eol

  • Loading branch information...
1 parent 4925b11 commit 8a2e47162841514b4b5ff5669370d54b2a0736a3 @shimaore shimaore committed Feb 15, 2013
View
@@ -177,63 +177,63 @@
**v0.3.0 "The Gumbo Variations"** (2011-09-29):
- Changed: "magic locals" replaced by properties of `this` (`get` becomes `@get`). See #74 and the [announcement](http://zappajs.org/docs/0.3-gumbo/announcement).
-
+
- Backtraces now show the relevant file and (js) file number.
-
+
- Normal JS scope restored: `def`, `zappa {foo}, ->` etc gone.
-
+
- Changed: automatic input "importing" and "exporting" to templates now optional through the `databag` setting. See #84.
-
+
- Changed: removed hard dependency on `jsdom`. To use `@postrender`, `npm install jsdom` first.
**v0.2.1** (2011-09-22):
- Changed: using standard jquery from code.jquery.com instead of node-jquery. Updated to 1.6.4.
-
+
- Changed: updated sammy to 0.7.0.
-
+
- Fixed #80: Default layout is not being added correctly.
**v0.2.0 "Peaches en Regalia"** (2011-09-08):
- Changed: externals (`zappa {foo} ->`) are available at all scopes, shadow globals and root scope locals.
-
+
- Fixed: inline templates with multiple apps.
-
+
- Added `stylus` to the root scope (compiles string with stylus and serves it as css).
-
+
- Fixed #58: multiple socket events fail. Also applied the same fix to helpers.
-
+
- Changed `zappa.run` to interpret a number-castable string param as the port, to better integrate with Heroku. Closes #61 [Tim Shadel]
-
+
- Fixed #64: require does not pick up node_modules in app dir. [Jason King]
-
+
- Added: setting views dir to `__dirname + '/views'` by default. Closes #71. [rachel-carvalho]
-
+
- Added the `minify` setting, which uses uglify-js to minify the outputs of `serve zappa`, `client`, `shared`, `coffee` and `js`. Closes #70 (thanks @jacobrask).
-
+
- Added back `session` to the request handlers scope. [shimaore]
**v0.2.0beta** (2011-08-02):
- Complete rewrite, see `/docs/peaches.md` for a more in-depth review on changes.
-
+
- Fixed performance, now negligible overhead on top of express. Gone with the `with` keyword.
- Scraped the `zappa` command, zappa code should go in `require('zappa') ->` blocks. All node tools and services can be used directly.
- Changed `include`, now implemented through standard module mechanisms. Code to be included must be exported: `@include = ->`.
- Added `app` and `io` variables to all scopes, providing direct access to express and socket.io.
-
+
- Added optimized interfaces to express features such as `use`, `set`, `enable`, `disable`, `configure`, etc.
-
+
- Changed `render`, now uses the rendering system from express, with all its features. Defining inline templates with `view` and passing variables through `@` is still possible.
-
+
- Added an optional client-side API that can be used with `client`. To just serve code as JS, use `coffee`.
-
+
- Added `shared`, allows sharing code between client and server.
-
+
- Removed most zappa's defaults, added very concise APIs to define what you need.
**v0.1.5** (2011-05-06):
View
@@ -1,19 +1,19 @@
{spawn, exec} = require 'child_process'
log = console.log
-
+
task 'build', ->
run 'coffee -o lib -c src/*.coffee'
-
+
task 'test', ->
# Set `ulimit -n 1024` if you run out of descriptors.
run 'coffee tests/index.coffee'
-
+
task 'bench', ->
run 'cd benchmarks && ./run'
-
+
task 'docs', ->
run 'docco src/*.coffee'
-
+
task 'vendor', ->
run 'mkdir -p vendor && cd vendor && curl -OL http://code.jquery.com/jquery-1.8.3.min.js', ->
run 'cd vendor && curl -OL https://github.com/quirkey/sammy/raw/master/lib/min/sammy-0.7.4.min.js', ->
@@ -37,7 +37,7 @@ run = (args...) ->
if a instanceof Array then params = a
else options = a
when 'function' then callback = a
-
+
command += ' ' + params.join ' ' if params?
cmd = spawn '/bin/sh', ['-c', command], options
cmd.stdout.on 'data', (data) -> process.stdout.write data
View
@@ -17,7 +17,7 @@ Get a `cuppa.coffee`:
And give your foot a push:
$ npm install zappajs
- $ coffee cuppa.coffee
+ $ coffee cuppa.coffee
info - socket.io started
Express server listening on port 3000 in development mode
Zappa 0.3.1 "The Gumbo Variations" orchestrating the show
@@ -1,8 +1,8 @@
require('./zappajs') ->
-
+
@get '/': ->
@render index: {layout: no}
-
+
@on 'set nickname': ->
@client.nickname = @data.nickname
@emit 'said', {nickname: 'moderator', msg: 'Your name is ' + @data.nickname}
@@ -18,19 +18,19 @@ require('./zappajs') ->
nickname: @client.nickname
msg: @data.msg
@broadcast_to @client.room, 'said', data
-
+
@client '/index.js': ->
@connect()
@on said: ->
$('#panel').append "<p>#{@data.nickname} said: #{@data.msg}</p>"
-
+
$ =>
@emit 'set nickname': {nickname: prompt 'Pick a nickname!'}
@emit 'set room': {room: prompt 'Pick a room!'}
-
+
$('#box').focus()
-
+
$('#sendButton').click (e) =>
@emit said: {msg: $('#box').val()}
$('#box').val('').focus()
@@ -1,6 +1,6 @@
require('./zappajs') ->
@enable 'default layout'
-
+
@get '/': ->
@user = plan: 'staff'
View
@@ -4,17 +4,17 @@ require('./zappajs') ->
@get
'/': ->
@render 'index', foo: 'bar'
-
+
'/eco': ->
@render 'index.eco', foo: 'bar'
-
+
'/jade': ->
@render 'index.jade', foo: 'bar'
@view index: ->
h2 'CoffeeCup inline template'
p @foo
-
+
@view layout: ->
doctype 5
html ->
@@ -23,12 +23,12 @@ require('./zappajs') ->
body ->
h1 'CoffeeCup inline layout'
@body
-
+
@view 'index.eco': '''
<h2>Eco inline template</h2>
<p><%= @foo %></p>
'''
-
+
@view 'layout.eco': '''
<!DOCTYPE html>
<html>
@@ -40,12 +40,12 @@ require('./zappajs') ->
</body>
</html>
'''
-
+
@view 'index.jade': '''
h2 Jade inline template
p= foo
'''
-
+
@view 'layout.jade': '''
!!! 5
html
View
@@ -5,7 +5,7 @@ port = 15200
client: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
-
+
zapp = zappa port++, ->
@client '/index.js': ->
@get '#/': -> alert 'hi'
@@ -24,7 +24,7 @@ port = 15200
coffee: (t) ->
t.expect 1, 2
t.wait 3000
-
+
zapp = zappa port++, ->
@coffee '/coffee.js': ->
alert 'hi'
@@ -47,7 +47,7 @@ port = 15200
c.get '/js.js', (err, res) ->
t.equal 1, res.body, "alert('hi');"
t.equal 2, res.headers['content-type'], 'application/javascript'
-
+
css: (t) ->
t.expect 1, 2
t.wait 3000
@@ -101,12 +101,12 @@ port = 15200
@with css:'stylus'
@stylus '/index.css': '''
border-radius()
- -webkit-border-radius arguments
- -moz-border-radius arguments
- border-radius arguments
+ -webkit-border-radius arguments
+ -moz-border-radius arguments
+ border-radius arguments
body
- font 12px Helvetica, Arial, sans-serif
+ font 12px Helvetica, Arial, sans-serif
a.button
border-radius 5px
@@ -124,7 +124,7 @@ port = 15200
-moz-border-radius: 5px;
border-radius: 5px;
}
-
+
'''
less: (t) ->
@@ -167,7 +167,7 @@ port = 15200
jquery: (t) ->
t.expect 'content-type', 'length'
t.wait 3000
-
+
zapp = zappa port++, ->
@use 'zappa'
@@ -179,7 +179,7 @@ port = 15200
sammy: (t) ->
t.expect 'content-type', 'length'
t.wait 3000
-
+
zapp = zappa port++, ->
@use 'zappa'
@@ -202,7 +202,7 @@ port = 15200
zappa: (t) ->
t.expect 'content-type', 'snippet'
t.wait 3000
-
+
zapp = zappa port++, ->
@use 'zappa'
@@ -226,19 +226,19 @@ port = 15200
'zappa (automatic)': (t) ->
t.expect 'content-type', 'snippet'
t.wait 3000
-
+
zapp = zappa port++, ->
@client '/index.js': ->
c = t.client(zapp.server)
c.get '/zappa/zappa.js', (err, res) ->
t.equal 'content-type', res.headers['content-type'], 'application/javascript'
t.ok 'snippet', res.body.indexOf('window.zappa = {};') > -1
-
+
minify: (t) ->
t.expect 'zappa', 'client', 'shared', 'coffee', 'js'
t.wait 3000
-
+
zapp = zappa port++, ->
@enable 'minify'
@client '/client.js': -> alert 'foo'
View
@@ -5,7 +5,7 @@ port = 15100
http: (t) ->
t.expect 1, 2
t.wait 3000
-
+
zapp = zappa port++, ->
@helper role: (name) ->
if @request?
@@ -14,25 +14,25 @@ port = 15100
@get '/': ->
@user = role: 'commoner'
@role 'lord'
-
+
c = t.client(zapp.server)
-
+
c.get '/', (err, res) ->
t.equal 1, res.statusCode, 302
t.ok 2, res.headers.location.match /\/login$/
multiple: (t) ->
t.expect 1, 2
t.wait 3000
-
+
zapp = zappa port++, ->
@helper sum: (a, b) -> a + b
@helper subtract: (a, b) -> a - b
@get '/': ->
t.equal 1, @sum(1, 2), 3
t.equal 2, @subtract(1, 2), -1
-
+
c = t.client(zapp.server)
c.get '/'
Oops, something went wrong.

0 comments on commit 8a2e471

Please sign in to comment.