Otter Framework is providing an Otter Chrome Extension for your applications. The extension comes with the following features:
You can find the Otter Devtools Chrome extension by clicking on this link or by searching for Otter DevTools
in the Chrome Web Store.
The Otter module will automatically register its Devtool service if the following configuration is set in the workspace configuration:
Example :[!NOTE] This configuration is set by the
--with-devtool
option of theng add @o3r/core
command.
Once you have download the extension, you will need to enable the features you need one by one. There is no root toggle.
To do so, you will need to import the corresponding modules in you AppModule
:
Then the activation of the services can be done in the AppComponent
as follows:
[!TIP] The services can be also activated at bootstrap time by providing
isActivatedOnBootstrap: true
to their dedicated tokenOTTER_<module>_DEVTOOLS_OPTIONS
. For example:
{provide: 'OTTER_CONFIGURATION_DEVTOOLS_OPTIONS', useValue: {isActivatedOnBootstrap: true}}
The services need to be injected in the application.
platformBrowserDynamic().bootstrapModule(AppModule).then((m) => runInInjectionContext(m.injector, () => inject(ConfigurationDevtoolsConsoleService)))
In your angular.json
or project.json
, you can specify assets
in the options of @angular-devkit/build-angular:application
.
[!CAUTION] We recommend adding this asset entry for the development configuration only.
[!NOTE] For the showcase application, we are exposing the metadata in production mode, in order to easily showcase the Chrome extension features.
If you are locally implementing modifications in the Otter DevTools extension, you can test these changes with the following steps:
yarn nx build chrome-devtools
0.0.0-placeholder
to 0.0.0
in the files dist/package.json
and dist/manifest.json
chrome://extensions/
(enable Developer mode
in the top-right corner), click the Load unpacked
button, and select the dist
folder of the previously built chrome-devtools application