gimbal-react
v1.0.3
Published
Create a React application to show the output from @modus/gimbal
Downloads
4
Maintainers
Readme
Gimbal React Output Plugin
Installation | Contributing | Code of Conduct | Twitter
A plugin that creates a React app to consume Gimbal's report.
Installation
npm install --save-dev gimbal-react
Usage
In your project's Gimbal configuration file, specify this plugin:
YAML
plugins:
- gimbal-react
JSON
{
"plugins": ["gimbal-react"]
}
JavaScript
module.exports = {
plugins: ['gimbal-react'],
};
Configuration
This plugin has a few configs that you can modify:
build
Defaults totrue
to build the generated React application. This will runnpm run build
, if you'd like to specify a different command, instead oftrue
, pass a string of the command:yarn build
.clean
Defaults totrue
, set tofalse
if you do not want to remove theout
directory prior to generating the React application.install
Defaults totrue
to install the node dependencies in the generated React application. This will runnpm install
, if you'd like to specify a different command, instead oftrue
, pass a string of the command:yarn
.logError
Default tofalse
, set totrue
to show the error logs during commands like thebuild
andinstall
commands.out
Defaults to'./artifacts/report'
which is relative to where Gimbal is running (or told to run).
To specify a configuration, instead of the usage above, return an object:
YAML Configuration
plugins:
- plugin: gimbal-react
build: yarn build
install: yarn
JSON Configuration
{
"plugins": [
{
"plugin": "gimbal-react",
"build": "yarn build",
"install": "yarn"
}
]
}
JavaScript Configuration
module.exports = {
plugins: [
{
plugin: 'gimbal-react',
build: 'yarn build',
install: 'yarn',
},
],
};
Notes
Due to how npm and yarn install node dependencies, if it detects a dependency being installed is available in a parent directory, it won't install in the generated React application directory. This means you may need to change the out
to be somewhere that will install all the dependencies.
Licensing
This project is MIT licensed.