litmus-test

Run Litmus Tests directly from the command line using Node.

npm install litmus-test
4 downloads in the last month

Litmus Test

Run Litmus Tests directly from the command line using Node.

A work in progress :(

Install

$ npm install litmus-test

Note: This will need to be npm linked for now.

Configure

TODO: Use a local package.json file.

$ cp config.example.json config.json

And update the settings however you like.

Quick start

Pipe a file at it:

$ cat path/to/email.html | litmus-test -d test/dir

PENDING: Or use a Node.js stream:

var fs = require('fs')
  , LitmusTest = require('./lib/litmus-test')
;

fs.createReadStream('foo/bar.html')
  .pipe(new LitmusTest)
;

Help

Thankfully, commander provides us with a command-line help:

$ litmus-test -h
  Usage: litmus-test [options]

  Options:

    -h, --help              output usage information
    -V, --version           output the version number
    -t, --testId <n>        test id for re-testing emails
    -i, --imageDir [value]  images file path
    -f, --htmlFile [value]  html email file to test
    -d, --dir [value]       set s3 directory to upload assets in bucket
    -l, --list              retrieve list of tests from litmus api

API integration

List tests

$ litmus-test -l

Re-test

$ cat path/to/email.html | litmus-test -t TEST_ID

PENDING: within Node.js, it is possible to create-or-retest:

var fs = require('fs')
  , LitmusTest = require('./lib/litmus-test')
;

fs.createReadStream('foo/bar.html')
  .pipe(new LitmusTest({ testId: TEST_ID }))
;
npm loves you