This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launch Yeoman Generator in separate thread (#6)
* Run Yeoman generator in separate node instance Signed-off-by: Vitaliy Gulyy <[email protected]>
- Loading branch information
1 parent
914502c
commit 7a0f742
Showing
8 changed files
with
762 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2019 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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.