Skip to content

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.

Example

# CaffeineScript
class Foo extends &MyBaseClass
  bar: -> "foo bar"
// JavaScript
module.exports = class Foo extends require('./MyBaseClass') {
  bar() {return "foo bar";}
};
Clone this wiki locally