Page MenuHomeSealhub

index.js
No OneTemporary

index.js

var Generator = require("yeoman-generator");
const path = require("path");
module.exports = class extends Generator {
constructor(args, opts) {
super(args, opts);
this.option("react");
}
initializing() {
this.composeWith(require.resolve("../typescript/index.js"));
this.composeWith(require.resolve("../react/index.js"));
}
writing() {
this.fs.copy(
this.templatePath("tsconfig.json"),
this.destinationPath("tsconfig.json")
);
for (let filename of [
"component.tsx",
"index.html",
"index.ts",
"front-end.tsx"
]) {
this.fs.copy(
this.templatePath(filename),
this.destinationPath(path.resolve("src", filename))
);
}
}
addElectron() {
this.npmInstall(["electron"], { "save-dev": true });
this.fs.extendJSON(this.destinationPath("package.json"), {
scripts: {
start: "electron src/index.js"
}
});
}
};

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 8, 08:52 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034382
Default Alt Text
index.js (873 B)

Event Timeline