UNPKG

patternplate-client

Version:

Universal javascript client application for patternplate

35 lines (24 loc) 2.47 kB
#!/usr/bin/env node 'use strict'; require('babel-polyfill'); var _minimist = require('minimist'); var _minimist2 = _interopRequireDefault(_minimist); var _ = require('../'); var _2 = _interopRequireDefault(_); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function main() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return (0, _2.default)(options); } var args = (0, _minimist2.default)(process.argv.slice(1)); main(args).catch(function (err) { setTimeout(function () { throw err; }); }); // Catch unhandled rejections globally process.on('unhandledRejection', function (reason, promise) { console.log('Unhandled Rejection at: Promise ', promise, ' reason: ', reason); throw reason; }); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NvdXJjZS9iaW5hcnkvcGF0dGVybnBsYXRlLWNsaWVudC5qcyJdLCJuYW1lcyI6WyJtYWluIiwib3B0aW9ucyIsImFyZ3MiLCJwcm9jZXNzIiwiYXJndiIsInNsaWNlIiwiY2F0Y2giLCJzZXRUaW1lb3V0IiwiZXJyIiwib24iLCJyZWFzb24iLCJwcm9taXNlIiwiY29uc29sZSIsImxvZyJdLCJtYXBwaW5ncyI6Ijs7QUFFQTs7QUFDQTs7OztBQUVBOzs7Ozs7QUFFQSxTQUFTQSxJQUFULEdBQTRCO0FBQUEsS0FBZEMsT0FBYyx1RUFBSixFQUFJOztBQUMzQixRQUFPLGdCQUFjQSxPQUFkLENBQVA7QUFDQTs7QUFFRCxJQUFNQyxPQUFPLHdCQUFTQyxRQUFRQyxJQUFSLENBQWFDLEtBQWIsQ0FBbUIsQ0FBbkIsQ0FBVCxDQUFiOztBQUVBTCxLQUFLRSxJQUFMLEVBQ0VJLEtBREYsQ0FDUSxlQUFPO0FBQ2JDLFlBQVcsWUFBTTtBQUNoQixRQUFNQyxHQUFOO0FBQ0EsRUFGRDtBQUdBLENBTEY7O0FBT0E7QUFDQUwsU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