# vue-cli-plugin-eruda

> Eruda Console Plugin for Vue CLI 3+

Latest version **1.5.0** (published 2023-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-cli-plugin-eruda
pnpm add vue-cli-plugin-eruda
yarn add vue-cli-plugin-eruda
bun add vue-cli-plugin-eruda
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2023-02-23 |
| First published | 2020-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 26.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Zichao Xiong |
| Maintainers | xiongamao |
| Keywords | console, mobile, debug |

## Links

- npm: https://www.npmjs.com/package/vue-cli-plugin-eruda
- Repository: https://github.com/XiongAmao/vue-cli-plugin-eruda
- Homepage: https://github.com/XiongAmao/vue-cli-plugin-eruda#readme
- Issues: https://github.com/liriliri/eruda/issues
- npm.io page: https://npm.io/package/vue-cli-plugin-eruda

## Dependencies (14)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [eruda](https://npm.io/package/eruda.md) ^2.11.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.0.1
- [eruda-dom](https://npm.io/package/eruda-dom.md) ^2.0.0
- [eruda-fps](https://npm.io/package/eruda-fps.md) ^2.0.0
- [camel-case](https://npm.io/package/camel-case.md) ^4.1.2
- [eruda-code](https://npm.io/package/eruda-code.md) ^2.1.0
- [eruda-memory](https://npm.io/package/eruda-memory.md) ^2.0.0
- [eruda-timing](https://npm.io/package/eruda-timing.md) ^2.0.1
- [eruda-touches](https://npm.io/package/eruda-touches.md) ^2.0.0
- [eruda-features](https://npm.io/package/eruda-features.md) ^2.0.0
- [eruda-benchmark](https://npm.io/package/eruda-benchmark.md) ^2.0.0
- [eruda-geolocation](https://npm.io/package/eruda-geolocation.md) ^2.0.0
- [eruda-orientation](https://npm.io/package/eruda-orientation.md) ^2.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.5.0 (latest) — 2023-02-23
- 1.4.0 — 2021-08-25
- 1.3.0 — 2021-03-24
- 1.2.1 — 2021-03-02
- 1.1.1 — 2020-02-14
- 1.1.0 — 2020-01-28
- 1.0.0 — 2020-01-13

## README

# vue-cli-plugin-eruda

[![npm](https://img.shields.io/npm/v/vue-cli-plugin-eruda.svg)](https://www.npmjs.com/package/vue-cli-plugin-eruda)
[![npm](https://img.shields.io/npm/l/vue-cli-plugin-eruda.svg)](https://www.npmjs.com/package/vue-cli-plugin-eruda)

> A Vue CLI 3+ plugin of [eruda](https://github.com/liriliri/eruda).

[中文文档](https://github.com/XiongAmao/vue-cli-plugin-eruda/blob/master/README.zh-CN.md)

## Installation

Install under a project created by `Vue CLI`, It will automatically load this plugin.

```bash
npm install --save-dev vue-cli-plugin-eruda

# If Vue CLI is installed globally
vue add erudu
```

## Global variable

After injection, a global variable will be provided for calling [eruda](https://github.com/liriliri/eruda) API.

```js
var eruda = require("eruda");
window.eruda === undefined && (window.eruda = eruda);
```

## Options

```js
// vue.config.js
module.exports = {
  // ... your configs 

  pluginOptions: {
    eruda: {
      // options
    }
  }
}
```

<table>
  <thead>
    <tr>
      <th>Options key</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>enable</td>
      <td>boolean</td>
      <td>When NODE_ENV !== 'production' plugin is enabled by default. You can pass true/false to force it to be enabled.</td>
    </tr>
    <tr>
      <td>exclude</td>
      <td>regexp | regexp[]</td>
      <td>Used to exclude entries which you don't want to inject eruda. For example you are using "pages" option in vue.config.js</td>
    </tr>
    <tr>
      <td>plugins</td>
      <td>string[]</td>
      <td>Passing plugin name to enable eruda plugin. You can use full module(['eruda-fps']) or shorthand(e.g. ['fps'] )</td>
    </tr>
    <tr>
      <td>container</td>
      <td>element</td>
      <td>Container element. If not set, it will append an element directly under html root element</td>
    </tr>
    <tr>
      <td>tool</td>
      <td>string[] | string</td>
      <td>Choose which eruda's tools you want, by default all will be added.</td>
    </tr>
    <tr>
      <td>autoScale=true</td>
      <td>boolean</td>
      <td>Auto scale eruda for different viewport settings.</td>
    </tr>
    <tr>
      <td>useShadowDom=true</td>
      <td>boolean</td>
      <td>Use shadow dom for css encapsulation.</td>
    </tr>
    <tr>
      <td>defaults	</td>
      <td>object</td>
      <td>Default settings.</td>
    </tr>
  </tbody>
</table>

Available `defaults` settings:
|Name        |Type  |Desc                                         |
|------------|------|---------------------------------------------|
|transparency|number|Transparency, 0 to 1                         |
|displaySize |number|Display size, 0 to 100                       |
|theme       |string|Theme, defaults to Light or Dark in dark mode|


`container`, `tool`, `autoScale`, `useShadowDom`, `defaults` are eruda's default configuration. You can check [document](https://github.com/liriliri/eruda/blob/master/doc/API.md) for more information.

## License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vue-cli-plugin-eruda · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
