Skip to content

Commit

Permalink
tree-editor: fixed ENOENT error (#184)
Browse files Browse the repository at this point in the history
Fixed `ENOENT` error for the `TreeEditor` extension.

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
  • Loading branch information
JonasHelming committed Dec 6, 2023
1 parent c44e654 commit 142beda
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A [yeoman](https://yeoman.io/) generator that scaffolds a project structure for

## How to use

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

```
npm install -g yo generator-theia-extension
Expand Down
32 changes: 26 additions & 6 deletions src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,18 +461,38 @@ module.exports = class TheiaExtension extends Base {
/** tree-editor */
if (this.params.extensionType === ExtensionType.TreeEditor) {
this.fs.copyTpl(
this.templatePath('tree-editor/'),
this.extensionPath(`src/browser/`),
this.templatePath('tree-editor/example-file'),
this.extensionPath(`src/browser/example-file`),
{ params: this.params }
);
this.fs.move(
this.extensionPath('src/browser/README.md'),
this.fs.copyTpl(
this.templatePath('tree-editor/style'),
this.extensionPath(`src/browser/style`),
{ params: this.params }
);
this.fs.copyTpl(
this.templatePath('tree-editor/tree'),
this.extensionPath(`src/browser/tree`),
{ params: this.params }
);
this.fs.copyTpl(
this.templatePath('tree-editor/README.md'),
this.extensionPath(`README.md`),
);
this.fs.move(
this.extensionPath('src/browser/tree-frontend-module.ts'),
this.fs.copyTpl(
this.templatePath('tree-editor/tree-contribution.ts'),
this.extensionPath(`src/browser/tree-contribution.ts`),
{ params: this.params }
);
this.fs.copyTpl(
this.templatePath('tree-editor/tree-frontend-module.ts'),
this.extensionPath(`src/browser/${this.params.extensionPath}-frontend-module.ts`),
);
this.fs.copyTpl(
this.templatePath('tree-editor/tree-label-provider-contribution.ts'),
this.extensionPath(`src/browser/tree-label-provider-contribution.ts`),
{ params: this.params }
);
}

/** DiagramEditor */
Expand Down

0 comments on commit 142beda

Please sign in to comment.