1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _regenerator;
|
8 |
|
9 | function _load_regenerator() {
|
10 | return _regenerator = _interopRequireDefault(require('babel-runtime/regenerator'));
|
11 | }
|
12 |
|
13 | var _asyncToGenerator2;
|
14 |
|
15 | function _load_asyncToGenerator() {
|
16 | return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'));
|
17 | }
|
18 |
|
19 | var _xdl;
|
20 |
|
21 | function _load_xdl() {
|
22 | return _xdl = require('xdl');
|
23 | }
|
24 |
|
25 | var _chalk;
|
26 |
|
27 | function _load_chalk() {
|
28 | return _chalk = _interopRequireDefault(require('chalk'));
|
29 | }
|
30 |
|
31 | var _log;
|
32 |
|
33 | function _load_log() {
|
34 | return _log = _interopRequireDefault(require('./log'));
|
35 | }
|
36 |
|
37 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
38 |
|
39 | exports.default = function () {
|
40 | var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)( (_regenerator || _load_regenerator()).default.mark(function _callee() {
|
41 | var user;
|
42 | return (_regenerator || _load_regenerator()).default.wrap(function _callee$(_context) {
|
43 | while (1) {
|
44 | switch (_context.prev = _context.next) {
|
45 | case 0:
|
46 | _context.next = 2;
|
47 | return (_xdl || _load_xdl()).User.getCurrentUserAsync();
|
48 |
|
49 | case 2:
|
50 | user = _context.sent;
|
51 |
|
52 |
|
53 |
|
54 | if (user) {
|
55 | (_log || _load_log()).default.newLine();
|
56 | (0, (_log || _load_log()).default)((_chalk || _load_chalk()).default.bold('Instructions to open this project on a physical device'));
|
57 | (0, (_log || _load_log()).default)((_chalk || _load_chalk()).default.underline('Android devices') + ': scan the above QR code.');
|
58 | (0, (_log || _load_log()).default)((_chalk || _load_chalk()).default.underline('iOS devices') + ': run ' + (_chalk || _load_chalk()).default.bold('exp send -s <your-phone-number-or-email>') + ' in this project directory in another terminal window to send the URL to your device.');
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | }
|
67 |
|
68 | (_log || _load_log()).default.newLine();
|
69 | (0, (_log || _load_log()).default)((_chalk || _load_chalk()).default.bold('Instructions to open this project on a simulator'));
|
70 | (0, (_log || _load_log()).default)('If you already have the simulator installed, run ' + (_chalk || _load_chalk()).default.bold('exp ios') + ' or ' + (_chalk || _load_chalk()).default.bold('exp android') + ' in this project directory in another terminal window.');
|
71 | (_log || _load_log()).default.newLine();
|
72 |
|
73 | case 8:
|
74 | case 'end':
|
75 | return _context.stop();
|
76 | }
|
77 | }
|
78 | }, _callee, this);
|
79 | }));
|
80 |
|
81 | function printRunInstructionsAsync() {
|
82 | return _ref.apply(this, arguments);
|
83 | }
|
84 |
|
85 | return printRunInstructionsAsync;
|
86 | }();
|
87 |
|
88 | module.exports = exports['default'];
|
89 |
|