a-mail-signature
Version:
Generate and modify Apple Mail E-Mail signatures
67 lines • 2.37 kB
JavaScript
;
// The above line is needed to be able to run in npx and CI.
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const yargs_1 = __importDefault(require("yargs"));
const create_1 = require("./create");
const delete_1 = require("./delete");
const update_1 = require("./update");
const log_1 = require("./utils/log");
log_1.log(`${log_1.red(' __')}
${log_1.red(' | _]')}
${log_1.red(' .--||---------.')}
${log_1.red(' | || |')}
${log_1.red(' | || |')}
${log_1.red(' ____|__||_________|')}
${log_1.orange('\\ |')}
__________________ ${log_1.orange('\\ |')}
| ^^^^ []| ${log_1.orange('||')}
| ^^^ | ${log_1.orange('||')}
| | ${log_1.orange('||')}
| ${log_1.green('a-mail-signature')} | ${log_1.orange('||')}
'------------------' ${log_1.orange('||')}
${log_1.orange('||')}
${log_1.orange('||')}
${log_1.green('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^')}
`);
log_1.logWarn(`Be sure Apple Mail is closed to prevent re-writing issues.
You can start Apple Mail once you finished modifying your signatures.
`);
yargs_1.default
.scriptName('a-mail-signature')
.command({
command: 'create [name] [path]',
aliases: ['c', 'add', 'a'],
describe: 'Create a signature from an HTML file',
handler: (args) => {
create_1.createSignature(args.name, args.path, args.mailDir);
},
})
.command({
command: 'update [name] [path]',
aliases: ['u', 'modify', 'm'],
describe: 'Update a signature from an HTML file',
handler: (args) => {
update_1.updateSignature(args.name, args.path, args.mailDir);
},
})
.command({
command: 'delete [name]',
aliases: ['d', 'remove', 'rm', 'r'],
describe: 'Delete an existing mail signature',
handler: (args) => {
delete_1.deleteSignature(args.name, args.mailDir);
},
})
.option('mail-dir', {
alias: 'm',
type: 'string',
description: 'Define a machine specific mail directory',
})
.wrap(100)
.demandCommand(2)
.help().argv;
//# sourceMappingURL=app.js.map