Vulcan/packages/telescope-newsletter
Maxime Quandalle 94c6121d91 Improve jsHint consistency
This commit touch a lot of lines of code with the goal to be more
rigorous about JavaScript code conventions defined in the `.jshintrc`.

Some modification:

* Add a list of used global symbols in the corresponding section of
  `.jshintrc`
* Use local variables instead of global in a lot of places where the
  keyword `var` was mistakenly forgotten
* Add missing semi-colons after instructions
* Add new lines at the end of files
* Remove trailing whitespaces
* Use newer name of some Meteor APIs, eg `addFiles` instead of
  `add_files`
* Add missing `break` statements in `switch` blocks
* Use `===` instead of `==` and `!==` instead of `!=`
* Remove unused variables

This commit should also fix a few bugs due to this lack of rigor. One
example of that was the test `typeof navElements === "array"` that was
never true because in JavaScript, `typeof [] === "object"`, we
replaced this test by the `_.isArray` method provided by underscore.
It might also fix some potential collision related to global
variables.

There is still plenty of work until Telescope code base passes jsHint
validation, but at least this commit is a step in the right direction.
2015-05-01 18:38:27 +02:00
..
.npm/package bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
i18n bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
lib Improve jsHint consistency 2015-05-01 18:38:27 +02:00
.gitignore bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
.versions bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
History.md bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
package-tap.i18n bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00
package.js Improve jsHint consistency 2015-05-01 18:38:27 +02:00
README.md bringing packages back into core repo after all 2015-04-22 07:50:11 +09:00

Telescope Newsletter

This package schedules an automatic newsletter digest.

Newsletter

Install

  1. mrt add telescope-newsletter.
  2. Go to the Telescope settings page and add your MailChimp API key and List ID.

Dependencies

Settings

  • Show Banner:
  • MailChimp API Key:
  • MailChimp List ID:
  • Newsletter Frequency: Choose from every day, three times a week, and once a week. Note that changes to this setting require you to restart your app to take effect.
  • Posts Per Newsletter: how many posts each newsletter should contain.

Note that for this package to work properly, you'll also need to fill in the Default Email setting.

How It Works

The package works with MailChimp, which means you'll need to fill in an API key and List ID in your Telescope app's settings panel.

Every x days, it builds a digest consisting of the top y items posted in the past x days that haven't yet been sent out in a newsletter.

It then creates a campaign in MailChimp and schedules it to be sent out one hour later, and sends you a confirmation email (to give you some time to check that everything looks good).

Test Routes

If you want to preview your email templates, you can do so at the following routes:

(Replace http://localhost:3000 with your app's URL)

Newsletter Sign-Up Banner

This package also includes a newsletter sign-up banner that uses the MailChimp API to add people to your list.

Newsletter Banner