1 | const { spawn } = require('child_process');
|
2 | const [_node, _bin, ...args] = process.argv;
|
3 |
|
4 | console.log(
|
5 | '===================================================================='
|
6 | );
|
7 | console.log('');
|
8 | console.log(
|
9 | ' The `ember` node module is a placeholder, you may be looking for:'
|
10 | );
|
11 | console.log('');
|
12 | console.log(' * `ember-cli` (the command line tool) ');
|
13 | console.log(' * `ember-source` (the framework code) ');
|
14 | console.log('');
|
15 | console.log(' Visit https://emberjs.com/ for more details');
|
16 | console.log('');
|
17 | console.log(
|
18 | '===================================================================='
|
19 | );
|
20 |
|
21 |
|
22 | if (args.includes('--postinstall')) {
|
23 | return;
|
24 | }
|
25 |
|
26 | console.log('');
|
27 | console.log(
|
28 | ` Forwarding request to ember-cli via \`npx ember-cli ${args.join(' ')}\``
|
29 | );
|
30 |
|
31 | spawn('npx', ['ember-cli', ...args], {
|
32 | stdio: 'inherit',
|
33 | }).on('exit', code => process.exit(code));
|