UNPKG

3.3 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7var _regenerator;
8
9function _load_regenerator() {
10 return _regenerator = _interopRequireDefault(require('babel-runtime/regenerator'));
11}
12
13var _asyncToGenerator2;
14
15function _load_asyncToGenerator() {
16 return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'));
17}
18
19var _xdl;
20
21function _load_xdl() {
22 return _xdl = require('xdl');
23}
24
25var _chalk;
26
27function _load_chalk() {
28 return _chalk = _interopRequireDefault(require('chalk'));
29}
30
31var _log;
32
33function _load_log() {
34 return _log = _interopRequireDefault(require('./log'));
35}
36
37function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
39exports.default = function () {
40 var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)( /*#__PURE__*/(_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 // If no user, we are offline and can't connect
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 // NOTE(brentvatne) Uncomment this when we update iOS client
61 // log(
62 // `Alternatively, sign in to your account (${chalk.bold(
63 // user.username
64 // )}) in the latest version of the Expo client on your iOS or Android device. Your projects will automatically appear in the "Projects" tab.`
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
88module.exports = exports['default'];
89//# sourceMappingURL=__sourcemaps__/printRunInstructionsAsync.js.map