1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | var __importStar = (this && this.__importStar) || function (mod) {
|
7 | if (mod && mod.__esModule) return mod;
|
8 | var result = {};
|
9 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
10 | result["default"] = mod;
|
11 | return result;
|
12 | };
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | const fs = __importStar(require("fs-extra"));
|
22 | const path = __importStar(require("path"));
|
23 | const utils = __importStar(require("./utils"));
|
24 |
|
25 | if (process.argv.length < 3) {
|
26 | let msg = '** Must supply a target extension name';
|
27 | process.stderr.write(msg);
|
28 | process.exit(1);
|
29 | }
|
30 |
|
31 | let target = process.argv[2];
|
32 | let basePath = path.resolve('.');
|
33 |
|
34 | let packagePath = path.join(basePath, 'packages', target, 'package.json');
|
35 | if (!fs.existsSync(packagePath)) {
|
36 | let msg = '** Absolute paths for packages are not allowed.';
|
37 | process.stderr.write(msg);
|
38 | process.exit(1);
|
39 | }
|
40 |
|
41 | fs.removeSync(path.dirname(packagePath));
|
42 |
|
43 | utils.run(`jlpm remove:dependency ${target}`);
|
44 |
|
\ | No newline at end of file |