Skip to content

Commit

Permalink
Merge pull request #4 from imperez/upgrade-babel
Browse files Browse the repository at this point in the history
upgrade to babel from 6to5
  • Loading branch information
Vadim committed Jun 24, 2015
2 parents 87a4f56 + 9ab2f87 commit 4388053
Show file tree
Hide file tree
Showing 8 changed files with 283 additions and 249 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -4,7 +4,7 @@ DEST = $(SRC:lib/%.js=build/%.js)
build: $(DEST)
build/%.js: lib/%.js
mkdir -p $(@D)
./node_modules/.bin/6to5 -b generators $< -o $@
./node_modules/.bin/babel --optional runtime $< -o $@

clean:
rm -rf build
14 changes: 7 additions & 7 deletions Readme.md
Expand Up @@ -25,7 +25,7 @@ node --harmony something.js
```

**Note**: In order for the following examples to work, you need use something like [co](https://github.com/tj/co) to run generators.
**Another note**: If you want to use ES6 classes (like in the following examples), use [6to5](https://github.com/6to5/6to5). If not, there is an alternative API left from previous versions of Mailman.
**Another note**: If you want to use ES6 classes (like in the following examples), use [babel](https://github.com/babel/babel). If not, there is an alternative API left from previous versions of Mailman.


## Usage
Expand Down Expand Up @@ -70,7 +70,7 @@ Mailman.configure({
auth: {
user: 'user@gmail.com',
pass: 'password'
}
}
});
```

Expand Down Expand Up @@ -111,22 +111,22 @@ class UserMailer extends Mailman.Mailer {
// need to manually set mailer name
// UserMailer => user
get name () { return 'user'; }

// default from for all emails
get from () { return 'sender@sender.com'; }

// default subject for all emails
get subject () { return 'Hello World'; }

// welcome email
welcome () {
// set all your template variables
// on this

this.full_name = 'John Doe';
this.currentDate = new Date();
}

// forgot password email
forgotPassword () {
this.token = 12345;
Expand Down

0 comments on commit 4388053

Please sign in to comment.