Questions tagged [coffeekup]

CoffeeKup is a templating engine for node.js and browsers that lets you to write your HTML templates in 100% pure CoffeeScript.

CoffeeKup <Ũp/>

Markup as CoffeeScript

CoffeeKup is a templating engine for node.js and browsers that lets you to write your HTML templates in 100% pure CoffeeScript.

http://www.coffeekup.org/

14 questions
13
votes
1 answer

In CoffeeScript, is there an 'official' way to interpolate a string at run-time instead of when compiled?

I have an options object in my CS class, and I'd like to keep some templates in it: class MyClass options: templates: list: "
    " listItem: "
  • #{ foo + bar }
  • " #…
    Adam
    • 3,061
    • 4
    • 21
    • 27
    3
    votes
    2 answers

    How can I use literal HTML in a CoffeeKup template?

    I'm becoming a huge fan of CoffeeKup, but I'm wondering how I can use literal HTML in such a template? For example when I just want to copy-paste some existing, non-CoffeeKup markup.
    nicolaskruchten
    • 22,120
    • 8
    • 63
    • 84
    2
    votes
    1 answer

    Running CoffeeKup on Rhino?

    I'm trying to get CoffeeKup to work with Mozilla's Rhino engine. Not much luck so far. I'm trying this simple template: templates ?= {} templates.first = -> doctype 5 html -> head -> title "#{@title}" body -> …
    nilskp
    • 2,868
    • 1
    • 28
    • 33
    2
    votes
    3 answers

    coffeekup as view engine with express 3

    I'm trying to use coffeekup as my default template app.set 'view engine', 'coffee' app.register '.coffee', coffeekup.adapters.express except app.register isn't a function it looks like. whats the migration?
    Funkodebat
    • 5,229
    • 3
    • 36
    • 54
    1
    vote
    1 answer

    Testing Node.js app with Zombie

    I am writing a node.js app in coffee-script using the express framework. After exploring a couple of options I finally decided to use mocha and zombie.js. However, I am having a hard testing the UI. For example, to implement a successful user…
    joque
    • 793
    • 2
    • 7
    • 13
    1
    vote
    1 answer

    Including scripts/content in Docpad coffeekup layout file after referencing 'content' template data variable

    I am having trouble pulling in end-of-page scripts (or other content) from my layout file after making the call for '@content.' I am using coffeekup templating and have the following default.html.coffee layout file. doctype 5 html -> head -> …
    8ken
    • 15
    • 4
    1
    vote
    2 answers

    TowerJS without CoffeeScript?

    I'm just looking at the possibilities in Node.js web development. I'm used to coding in ASP.NET MVC 3, so TowerJS and Geddy looks friendly and familiar to me (because of the MVC pattern) However I don't really like CoffeeScript (because of its…
    Zsolt
    • 3,203
    • 3
    • 28
    • 46
    0
    votes
    1 answer

    How do I make use of CoffeeKup when writing jQuery

    I am quite new to web development and have started programming with node.js & express and using the coffeekup view engine. My problem is the following: If I use the CoffeeKup view engine can I somehow insert coffeeKup code as a parameter to the…
    Jason Blade
    • 363
    • 1
    • 3
    • 17
    0
    votes
    1 answer

    dynamic binding in CoffeeKup

    I am writing an app with node.js and coffee-script and coffeekup as template engine. I have a form where I'd like to enable or disable a button depending on whether there are values in some input fields. I am wondering whether there is a…
    joque
    • 793
    • 2
    • 7
    • 13
    0
    votes
    0 answers

    How to get an empty (i.e. no-value) attribute in an HTML element in coffeekup's output?

    I'm trying to get started with AngularJS using coffeescript and coffeekup. AngularJS is capable of auto-bootstrapping itself when it detects the ng-app attribute on any HTML element. According to the docs, it should be placed on the or …
    Mitja
    • 1,879
    • 26
    • 30
    0
    votes
    1 answer

    Template engine with CoffeeScript

    I found the following template engines with CoffeeScript https://github.com/mauricemach/coffeekup (last commit 2 years ago) https://github.com/sstephenson/eco (last commit 2 years ago) https://github.com/ddopson/jade-coffeescript (last commit 4…
    user977828
    • 5,651
    • 11
    • 47
    • 99
    0
    votes
    1 answer

    Overriding template logic in TowerJS Views

    How do I override how templates are rendered in TowerJS? I know I can use Jade, but if I stuck with CoffeeKup, how could I, for instance have this code: formFor @user, (form) -> form.fieldset "Profile", (fields) -> fields.field "firstName" …
    User 1058612
    • 3,371
    • 24
    • 32
    0
    votes
    1 answer

    Coffeescript / Zappajs how to pass array to be rendered

    This is a zappajs/coffeescript newbie question, I try to write a script that collects from mysql and renders results with div, not tables, works so far with just one row. My question how do I pass on the whole result array for output with the…
    user1559375
    0
    votes
    1 answer

    embedded coffeescript in a coffeekup view in zappa

    Is there a way to pass variable values (just for reading, obviously) from the app to the embedded coffeescript in a coffeekup view (in zappa), such as: .... @render 'index', myVar:"something" @view index: -> coffeescript -> $(document).ready…
    Eve Freeman
    • 30,388
    • 2
    • 79
    • 95