Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Run Yeoman generator in separate node instance
Browse files Browse the repository at this point in the history
Signed-off-by: Vitaliy Gulyy <[email protected]>
  • Loading branch information
vitaliy-guliy committed Dec 26, 2019
1 parent 914502c commit deca66b
Show file tree
Hide file tree
Showing 6 changed files with 488 additions and 280 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"theiaPlugin": "latest"
},
"theiaPlugin": {
"backend": "lib/theia-yeoman-plugin-backend-plugin.js"
"backend": "lib/theia-yeoman-backend-plugin.js"
},
"dependencies": {
"yeoman-environment": "2.3.0"
Expand Down
180 changes: 0 additions & 180 deletions src/theia-yeoman-adapter.ts

This file was deleted.

38 changes: 38 additions & 0 deletions src/theia-yeoman-backend-plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*********************************************************************
* Copyright (c) 2018 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/

import * as theia from '@theia/plugin';

import { YeomanProcessAdapter } from './yeoman-process-adapter';

/**
* Entry point of the plug-in.
* Once starting the plug-in, register a command to start Yeoman wizard.
*/
export function start(context: theia.PluginContext) {
const yeomanWizardCommand = {
id: 'theia-yeoman-plugin-wizard',
label: "Yeoman Wizard"
};

theia.commands.registerCommand(yeomanWizardCommand, (...args: any[]) => {
showWizard(context);
});
}

let yeoman: YeomanProcessAdapter | undefined;

function showWizard(context: theia.PluginContext) {
if (yeoman) {
yeoman.destroy();
}

yeoman = new YeomanProcessAdapter((context as any).extensionPath);
}
99 changes: 0 additions & 99 deletions src/theia-yeoman-plugin-backend-plugin.ts

This file was deleted.

Loading

0 comments on commit deca66b

Please sign in to comment.