Hi,
I build a desktop application based on theia blueprint, I want to remove some of the internal packages because I do not need them, like source control and extensions. for now I just remove the dependency from package.json, but the container is still in, where can I remove it completely
I believe the extension view is contributed by the @theia/vsx-registry
package, the source control view by @theia/scm
. I’m not sure it’s possible to remove the @theia/scm
package, since the @theia/plugin-ext
package (required for plugin support) depends on it. You can run yarn why <package>
to find out why a package is imported even though it’s not in the package.json
.
To remove it the scm view, you’ll likely need to override the ScmContribution
yourself.
Hi,
I try to implement a EmptyScmContribution, but has a problem,
you know super constructor has code
this create the option to add scm to left bar. and it is readonly, seem can not be changed
In theia, almost all codes can be changed through ‘rebind’
I’m not sure it’s possible to remove the
@theia/scm
package, since the@theia/plugin-ext
package (required for plugin support) depends on it.
Does that dependency really make scm removal impossible? Or simply make scm removal require plugin-ext removal?
@chrisjj Yes, if you were to remove @theia/plugin-ext
, you can easily remove the @theia/scm
dependency. Note that you lose support for all vscode extensions in that case. In theory you can build an application purely on the @theia/core
package, but it doesn’t do anything, since it doesn’t contain any features, only building blocks to contribute features to Theia.
Yes, if you were to remove
@theia/plugin-ext
, you can easily remove the@theia/scm
dependency.
Thanks.
Note that you lose support for all vscode extensions in that case.
No problem, given the OP specified “I do not need them, like source control and extensions.”
Regardless it sounds like plugin-ext’s dependency on scm might deserve review.
@wss you can use what is known as a FilterContribution
to remove contributions in the framework such as the ones contributed by @theia/scm
. You can follow a similar approach to this question where the debug-view
was filtered out: I need to remove "Debug" functionality - #2 by vince-fugnitto.
registerContributionFilters(registry: ContributionFilterRegistry): void {
registry.addFilters('*', [
filterClassName(name => name !== 'ScmContribution')
]);
}
You may need to run the command reset workbench layout
in the application once you filter out for the first time to clean up any local storage that may still be referencing the view. By default you’ll end up without the scm-view
present (among other contributions like commands, statusbar items):
hi,
Get it,thanks great