UNPKG

generator-theia

Version:

Theia Generator

44 lines 2.04 kB
"use strict"; /* * Copyright (C) 2017 TypeFox and others. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var BaseGenerator = require("yeoman-generator"); var common_1 = require("../common"); var extension_package_generator_1 = require("./extension-package-generator"); var TheiaExtensionGenerator = (function (_super) { __extends(TheiaExtensionGenerator, _super); function TheiaExtensionGenerator() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.model = new common_1.Model(); _this.pck = new extension_package_generator_1.ExtensionPackageGenerator(_this.model); return _this; } TheiaExtensionGenerator.prototype.initializing = function () { this.model.pck = this.fs.readJSON("extension.package.json") || {}; this.config.defaults(this.model.defaultExtensionConfig); Object.assign(this.model.extensionConfig, this.config.getAll()); }; TheiaExtensionGenerator.prototype.configuring = function () { this.config.save(); }; TheiaExtensionGenerator.prototype.writing = function () { this.pck.generate(this.fs); }; return TheiaExtensionGenerator; }(BaseGenerator)); exports.TheiaExtensionGenerator = TheiaExtensionGenerator; //# sourceMappingURL=extension-generator.js.map