Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meltingice/coffeescript-module
A base class for your Coffeescript projects
https://github.com/meltingice/coffeescript-module
Last synced: 24 days ago
JSON representation
A base class for your Coffeescript projects
- Host: GitHub
- URL: https://github.com/meltingice/coffeescript-module
- Owner: meltingice
- Created: 2013-03-07T00:04:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-10T15:07:32.000Z (over 10 years ago)
- Last Synced: 2024-09-13T20:38:41.304Z (about 2 months ago)
- Language: CoffeeScript
- Size: 152 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coffeescript-module
A base little class for your Coffeescript projects.
```
npm install coffeescript-module
```## Examples
``` coffeescript
{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 Barbar = new Bar()
bar.log() # calls Foo::log()
bar.b() # calls Bar::a()
bar.d # gets Bar::cbaz = 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