-
Notifications
You must be signed in to change notification settings - Fork 6
Auto Export
Shane Brinkman-Davis edited this page Mar 20, 2017
·
3 revisions
Related: Auto Import, Auto Require, Modules and CommonJs
The return value of the file is the exports for the module. As with any other statements-block, the last statement of the file is its return value.
# CaffeineScript
class Foo extends &MyBaseClass
bar: -> "foo bar"
// JavaScript
module.exports = class Foo extends require('./MyBaseClass') {
bar() {return "foo bar";}
};
- Home
- Get Started
- Benefits
- Highlights
- Productivity by Design
- CaffeineScript Design
- What is CaffeineScript Good For?
- Get the most out of JavaScript
- Language Comparison
- CHANGELOG
- Blocks Instead of Brackets
- Binary Line-Starts
- Everything Returns a Value
- Streamlined Modules
- Scopes and Variables
- Optional Commas
- Semantics
- Ambiguities