Socket
Socket
Sign inDemoInstall

creamer

Package Overview
Dependencies
171
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    creamer

A flatiron plugin for dynamic coffeecup templates


Version published
Weekly downloads
2
Maintainers
1
Install size
4.00 MB
Created
Weekly downloads
 

Readme

Source

Creamer

build status

Creamer is a server side flatiron plugin that provides coffeecup views and easy controller mounting.

install

npm install creamer

usage

flatiron = require 'flatiron'
creamer = require 'creamer'
app = flatiron.app
layout = require __dirname + '/views/layout'
app.use creamer, layout: layout, viewDir: __dirname + '/views'

app.get '/', -> @bind('index')

app.start 3000

api

options

option | Description -----------|----------|-------------|------------- layout | coffeecup layout views | directory to your views controllers| directory to your controllers

app.bind(template, data)

ParameterTypeRequiredDescription
templatefunctionyescoffeecup template
dataobjectnoany data you want to pass to your template

example

app.router.get '/', -> @bind('index')

app.registerHelper(name, fn)

register any helper to your coffeecup

ParameterTypeRequired?Description
namestringyesname of helper
fnfunctionyescoffeecup function

example

app.registerHelper 'foo', (baz) -> baz + 'bar'

app.registerView(name, fn)

register view

ParameterTypeRequired?Description
namestringyesname of helper
fnfunctionyescoffeecup function

roadmap

check issues

contribute

everyone is welcome to contribute. patches, bugfixes, new features

  1. create an issue on github so the community can comment on your idea
  2. fork creamer in github
  3. create a new branch git checkout -b my_branch
  4. create tests for the changes you made
  5. make sure you pass both existing and newly inserted tests
  6. commit your changes
  7. push to your branch git push origin my_branch
  8. create an pull request

tests

npm install mocha -g
npm install
npm test

license

see LICENSE

Keywords

FAQs

Last updated on 03 Jul 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc