Skip to content

Commit 142beda

Browse files
authored
tree-editor: fixed ENOENT error (#184)
Fixed `ENOENT` error for the `TreeEditor` extension. Signed-off-by: Jonas Helming <[email protected]>
1 parent c44e654 commit 142beda

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A [yeoman](https://yeoman.io/) generator that scaffolds a project structure for
2121

2222
## How to use
2323

24-
To use it, install `yo` and the `generator`.
24+
To use it, install `yo` (version 4.x.x) and the `generator` (see next below).
2525

2626
```
2727
npm install -g yo generator-theia-extension

src/app/index.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,18 +461,38 @@ module.exports = class TheiaExtension extends Base {
461461
/** tree-editor */
462462
if (this.params.extensionType === ExtensionType.TreeEditor) {
463463
this.fs.copyTpl(
464-
this.templatePath('tree-editor/'),
465-
this.extensionPath(`src/browser/`),
464+
this.templatePath('tree-editor/example-file'),
465+
this.extensionPath(`src/browser/example-file`),
466466
{ params: this.params }
467467
);
468-
this.fs.move(
469-
this.extensionPath('src/browser/README.md'),
468+
this.fs.copyTpl(
469+
this.templatePath('tree-editor/style'),
470+
this.extensionPath(`src/browser/style`),
471+
{ params: this.params }
472+
);
473+
this.fs.copyTpl(
474+
this.templatePath('tree-editor/tree'),
475+
this.extensionPath(`src/browser/tree`),
476+
{ params: this.params }
477+
);
478+
this.fs.copyTpl(
479+
this.templatePath('tree-editor/README.md'),
470480
this.extensionPath(`README.md`),
471481
);
472-
this.fs.move(
473-
this.extensionPath('src/browser/tree-frontend-module.ts'),
482+
this.fs.copyTpl(
483+
this.templatePath('tree-editor/tree-contribution.ts'),
484+
this.extensionPath(`src/browser/tree-contribution.ts`),
485+
{ params: this.params }
486+
);
487+
this.fs.copyTpl(
488+
this.templatePath('tree-editor/tree-frontend-module.ts'),
474489
this.extensionPath(`src/browser/${this.params.extensionPath}-frontend-module.ts`),
475490
);
491+
this.fs.copyTpl(
492+
this.templatePath('tree-editor/tree-label-provider-contribution.ts'),
493+
this.extensionPath(`src/browser/tree-label-provider-contribution.ts`),
494+
{ params: this.params }
495+
);
476496
}
477497

478498
/** DiagramEditor */

0 commit comments

Comments
 (0)