UNPKG

1.74 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6
7const debug = require('debug');
8
9const core = require('@beemo/core');
10
11const cli = require('@boost/cli');
12
13const parseSpecialArgv = require('./parseSpecialArgv.js');
14
15const _interopDefault = e => e && e.__esModule ? e : {
16 default: e
17};
18
19const debug__default = /*#__PURE__*/_interopDefault(debug);
20/* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/prefer-nullish-coalescing */
21
22
23const brandName = process.env.BEEMO_BRAND_NAME || 'Beemo';
24const binName = process.env.BEEMO_BRAND_BINARY || 'beemo';
25const manualURL = process.env.BEEMO_MANUAL_URL || 'https://beemo.dev';
26process.env.BOOSTJS_DEBUG_NAMESPACE = binName; // Instrument our CLI for require() performance
27
28if (process.env.TIMING) {
29 require('time-require'); // Boost doesn't enable the debugger early enough,
30 // so enable it here if we encounter the debug flag.
31
32} else if (process.argv.includes('--debug')) {
33 debug__default.default.enable(`${binName}:*`);
34}
35
36const _parseSpecialArgv$par = parseSpecialArgv.parseSpecialArgv(process.argv.slice(2)),
37 argv = _parseSpecialArgv$par.argv,
38 parallelArgv = _parseSpecialArgv$par.parallelArgv;
39
40const tool = new core.Tool({
41 argv,
42 projectName: binName
43});
44
45const _require = require('@beemo/core/package.json'),
46 version = _require.version;
47
48const footer = cli.applyStyle([tool.msg('app:cliEpilogue', {
49 manualURL
50}), tool.msg('app:poweredBy', {
51 version
52})].join('\n'), 'muted');
53const program = new cli.Program({
54 bin: binName,
55 footer,
56 name: brandName,
57 version
58});
59exports.argv = argv;
60exports.parallelArgv = parallelArgv;
61exports.program = program;
62exports.tool = tool;
63//# sourceMappingURL=setup.js.map