Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate asset manager - Piler #95

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**v0.3.1** (2011-10-06):

- Changed dependency minors to ".x". Closes #98.

**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).
Expand Down
6 changes: 3 additions & 3 deletions docs/0.3-gumbo/reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: API Reference (v0.3.0)
title: API Reference (v0.3.1)
permalink: /reference/index.html
---

Expand All @@ -14,9 +14,9 @@ permalink: /reference/index.html

### zappa.version

Version of zappa running. Ex.: `0.3.0`.
Version of zappa running. Ex.: `0.3.1`.

If you're running a version not released on npm (directly from the repo), it will have `edge` appended to it. Ex.: `0.3.0edge`.
If you're running a version not released on npm (directly from the repo), it will have `edge` appended to it. Ex.: `0.3.1edge`.

### zappa.app

Expand Down
2 changes: 1 addition & 1 deletion docs/crashcourse.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ And give your foot a push:
$ coffee cuppa.coffee
info - socket.io started
Express server listening on port 3000 in development mode
Zappa 0.3.0 "The Gumbo Variations" orchestrating the show
Zappa 0.3.1 "The Gumbo Variations" orchestrating the show

(hat tip to [sinatra](http://sinatrarb.com))

Expand Down
2 changes: 1 addition & 1 deletion docs/zappa.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html> <html> <head> <title>zappa.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="client.html"> client.coffee </a> <a class="source" href="zappa.html"> zappa.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> zappa.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <p><strong>Zappa</strong> is a <a href="http://coffeescript.org">CoffeeScript</a> DSL-ish interface for building web apps on the
<a href="http://nodejs.org">node.js</a> runtime, integrating <a href="http://expressjs.com">express</a>, <a href="http://socket.io">socket.io</a>
and other best-of-breed libraries.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa = version: </span><span class="s1">&#39;0.3.0&#39;</span>
and other best-of-breed libraries.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">zappa = version: </span><span class="s1">&#39;0.3.1&#39;</span>

<span class="nv">codename = </span><span class="s1">&#39;The Gumbo Variations&#39;</span>

Expand Down
35 changes: 35 additions & 0 deletions examples/assets.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require('./zappa') ->

@enable 'serve jquery'

@get "/": ->
@render 'index'

@client ->
console.log "Hello, I will run on every page"

@client namespaced: ->
console.log "I will run only where namespace 'namespaced' is"


@view index: ->
div ->
h1 -> "Hello, Piler in Zappa!"
p ->
span -> "Checkout the log and "
a href: "http://epeli.github.com/piler/", -> "Piler homepage!"


@css '''
h1 {
color: blue;
}
'''

@view layout: ->
doctype 5
html ->
head ->
title "Hello Assets"
@renderStyleTags() + @renderScriptTags("namespaced")
body @body
16 changes: 8 additions & 8 deletions examples/views.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ require('./zappa') ->
@get
'/': ->
@render 'index', foo: 'bar'

'/eco': ->
@render 'index.eco', foo: 'bar'

'/jade': ->
@render 'index.jade', foo: 'bar'

@view index: ->
h2 'CoffeeKup inline template'
p @foo

@view layout: ->
doctype 5
html ->
Expand All @@ -21,12 +21,12 @@ require('./zappa') ->
body ->
h1 'CoffeeKup inline layout'
@body

@view 'index.eco': '''
<h2>Eco inline template</h2>
<p><%= @foo %></p>
'''

@view 'layout.eco': '''
<!DOCTYPE html>
<html>
Expand All @@ -38,12 +38,12 @@ require('./zappa') ->
</body>
</html>
'''

@view 'index.jade': '''
h2 Jade inline template
p= foo
'''

@view 'layout.jade': '''
!!! 5
html
Expand All @@ -52,4 +52,4 @@ require('./zappa') ->
body
h1 Jade inline layout
!= body
'''
'''
4 changes: 3 additions & 1 deletion examples/views/layout.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ doctype 5
html ->
head ->
title 'CoffeeKup file layout'
@renderStyleTags()
@renderScriptTags()
body ->
h1 'CoffeeKup file layout'
@body
@body
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
{
"name": "zappa",
"description": "CoffeeScript minimalist interface to express, socket.io and others",
"version": "0.3.0",
"version": "0.3.1",
"author": "Maurice Machado <[email protected]>",
"homepage": "http://zappajs.org",
"repository": {"type": "git", "url": "git://github.com/mauricemach/zappa.git"},
"scripts": {
"test": "cake test"
},
"dependencies": {
"express": "2.4.6",
"socket.io": "0.8.4",
"coffeekup": "0.3.1",
"node-uuid": "1.2.0",
"uglify-js": "1.1.0"
"piler": "0.3.0",
"express": "2.4.x",
"socket.io": "0.8.x",
"coffeekup": "0.3.x",
"node-uuid": "1.2.x",
"uglify-js": "1.1.x",
"express": "2.4.6",
"socket.io": "0.8.4",
"coffeekup": "0.3.1",
"node-uuid": "1.2.0",
"piler": "0.3.0"
},
"devDependencies": {
"jsdom": "0.2.5",
Expand Down Expand Up @@ -41,4 +54,4 @@
"Kris Molendyke <[email protected]>",
"Rafael de Oleza Alomar <[email protected]>"
]
}
}
2 changes: 1 addition & 1 deletion src/client.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ skeleton = ->
String(skeleton)
.replace('version = null;', "version = '#{version}';")
.replace('coffeescript_helpers = null;', "var coffeescript_helpers = '#{coffeescript_helpers}';")
.replace('settings = null;', "var settings = #{JSON.stringify settings};")
.replace('settings = null;', "var settings = #{JSON.stringify settings};")
Loading