1 | #!/usr/bin/env node
|
2 |
|
3 | const updateNotifier = require('update-notifier');
|
4 | const pkg = require('../package.json');
|
5 | const command = require('../dist/process/command');
|
6 | const fs = require('fs');
|
7 | const path = require('path');
|
8 |
|
9 | updateNotifier({pkg, ...pkg}).notify({
|
10 | isGlobal: true,
|
11 | });
|
12 |
|
13 | const commandHandler = path.resolve(__dirname, `../dist/bitrix.${command}.js`);
|
14 |
|
15 | if (fs.existsSync(commandHandler)) {
|
16 | require(commandHandler)();
|
17 | } else {
|
18 | require('../dist/bitrix.unhandled')();
|
19 | } |
\ | No newline at end of file |