ern-api-gen
Version:
Electrode Native API generator
35 lines • 1.45 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable:variable-name */
const JavascriptClientCodegen_1 = __importDefault(require("./JavascriptClientCodegen"));
const SupportingFile_1 = __importDefault(require("../SupportingFile"));
class ES6Codegen extends JavascriptClientCodegen_1.default {
constructor() {
super();
this.__templateDir = 'es6';
this.invokerPackage = '';
this.__supportingFiles = this.__supportingFiles.filter(v => v.templateFile !== 'mocha.opts');
this.__supportingFiles.push(new SupportingFile_1.default('babelrc.mustache', '', '.babelrc'));
this.__supportingFiles.push(new SupportingFile_1.default('npmignore.mustache', '', '.npmignore'));
this.__supportingFiles.push(new SupportingFile_1.default('gitignore.mustache', '', '.gitignore'));
this.usePromises = true;
}
processOpts() {
super.processOpts();
const f = this[`addSupportingFilesFor${JavascriptClientCodegen_1.default.camelize(this.getLibrary())}`];
if (f) {
f.call(this);
}
}
getName() {
return 'ES6';
}
apiFileFolder() {
return this.__outputFolder + '/src/api';
}
}
exports.default = ES6Codegen;
//# sourceMappingURL=ES6Codegen.js.map