UNPKG

1.09 kBPlain TextView Raw
1#!/usr/bin/env node
2
3process.on('unhandledRejection', on_unhandled_error);
4process.on('uncaughtException', on_unhandled_error);
5
6var os = require('os'),
7 path = require('path');
8
9process.env.BABEL_CACHE_PATH = path.join(os.tmpdir(), '/ryuu.json');
10
11// enable awesomeness
12require("babel/register")({
13 stage: 0,
14 sourceMap: 'inline',
15 only: ['domo.js', 'server.js', 'commands/**.js', 'util/**.js', 'polyfills/**.js']
16});
17
18var already_warned = false;
19function on_unhandled_error(err) {
20 if (already_warned) {
21 return;
22 }
23
24 already_warned = true;
25
26 console.log('');
27 console.error('[ERROR] The domo cli tool has experienced an error. As it is');
28 console.error('[ERROR] possible this bug has already been fixed, please try updating');
29 console.error('[ERROR] using `npm install -g ryuu` and run this command again. If this');
30 console.error('[ERROR] does not fix the issue, please contact your MajorDomo.');
31 console.error('[ERROR] error message: %s', err.message);
32}
33
34// enable source maps
35require('source-map-support').install();
36
37require('./domo');