1 | "use strict";
|
2 |
|
3 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4 | return new (P || (P = Promise))(function (resolve, reject) {
|
5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
8 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9 | });
|
10 | };
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | const index_1 = require("../index");
|
13 | const manager = new index_1.PluginManager();
|
14 | function run() {
|
15 | return __awaiter(this, void 0, void 0, function* () {
|
16 | yield manager.install("moment");
|
17 | yield manager.install("lodash", "4.17.4");
|
18 | const _ = manager.require("lodash");
|
19 | console.log(_.defaults({ a: 1 }, { a: 3, b: 2 }));
|
20 | const moment = manager.require("moment");
|
21 | console.log(moment().format());
|
22 | yield manager.uninstall("moment");
|
23 | yield manager.uninstall("lodash");
|
24 | });
|
25 | }
|
26 | run();
|
27 |
|
\ | No newline at end of file |