UNPKG

1.29 kBJavaScriptView Raw
1"use strict";
2// tslint:disable:no-console
3var __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};
11Object.defineProperty(exports, "__esModule", { value: true });
12const index_1 = require("../index");
13const manager = new index_1.PluginManager();
14function 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}
26run();
27//# sourceMappingURL=basic.js.map
\No newline at end of file