1 | ;
|
2 |
|
3 | // local modules
|
4 |
|
5 | const scope = require('../lib/scope');
|
6 |
|
7 | // this module
|
8 |
|
9 | module.exports = function (input, flags, options) {
|
10 | if (input[0]) {
|
11 | scope.write({ scope: input[0] })
|
12 | .catch((err) => {
|
13 | console.error(err);
|
14 | process.exit(1);
|
15 | });
|
16 | return;
|
17 | }
|
18 |
|
19 | scope.read()
|
20 | .then((scope) => {
|
21 | console.log(scope);
|
22 | process.exit(0);
|
23 | })
|
24 | .catch((err) => {
|
25 | console.error(err);
|
26 | process.exit(1);
|
27 | });
|
28 | };
|