coffeescript-module
A base class for your Coffeescript projects
Last updated 7 years ago by meltingice .
Repository · Original npm · Tarball · package.json
$ cnpm install coffeescript-module 
SYNC missed versions from official npm registry.

coffeescript-module

A base little class for your Coffeescript projects.

npm install coffeescript-module

Examples

{Module} = require 'coffeescript-module'

class Foo extends Module
  log: -> console.log 'hi!'

class Bar extends Module
  @delegate 'log', Foo
  @aliasFunction 'b', 'a'
  @aliasProperty 'd', 'c'

  c: 'test'
  a: -> console.log 'a'

class Baz extends Module
  @includes Bar

bar = new Bar()
bar.log() # calls Foo::log()
bar.b()   # calls Bar::a()
bar.d     # gets Bar::c

baz = new Baz()
baz.b()   # calls Bar::a()

Contributing

If you have a useful addition or a bug fix, send a pull request!

TODO

  • Write tests

Current Tags

  • 0.2.1                                ...           latest (6 years ago)

6 Versions

  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 35
This Week 185
This Month 324
Last Day 51
Last Week 236
Last Month 1,284
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |