# vue-consoles

> console log system for Vue Based on Window.console

Latest version **1.0.3** (published 2020-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-consoles
pnpm add vue-consoles
yarn add vue-consoles
bun add vue-consoles
```

## 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.0.3 |
| Published | 2020-07-01 |
| First published | 2020-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | HyoSung |
| Maintainers | khs9339 |
| Keywords | vue, console, log, debug, error, console.log |

## Links

- npm: https://www.npmjs.com/package/vue-consoles
- Repository: https://github.com/khs9339/vue-consoles
- Homepage: https://github.com/khs9339/vue-consoles#readme
- Issues: https://github.com/khs9339/vue-consoles/issues
- npm.io page: https://npm.io/package/vue-consoles

## 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.0.3 (latest) — 2020-07-01
- 1.0.4-alpha.3 (alpha) — 2021-08-12
- 1.0.4-beta.1 (beta) — 2021-08-12
- 1.0.4-beta.2 — 2021-08-12
- 1.0.4-alpha.2 — 2021-08-12
- 1.0.4-beta.0 — 2021-08-12
- 1.0.4-alpha.1 — 2021-08-12
- 1.0.4-alpha.0 — 2021-08-12
- 1.0.2 — 2020-06-23
- 1.0.1 — 2020-06-23
- 1.0.0 — 2020-06-23
- 0.0.3 — 2020-06-23
- 0.0.2 — 2020-06-19
- 0.0.1 — 2020-06-19

## README

# Vue Consoles 
>Window Console Log Plugin For Vue Based

## Install 
```shell
npm i -s vue-consoles 
yarn add vue-consoles 
```

## Test
```shell
npm run test
```

## Usage
### - Settings
```js
// main.js
import VueConsoles from "vue-consoles";
...

Vue.use(VueConsoles, {
  currentEnv: 'local',
  prefix: ['VUE-CONSOLES', '_ENV_'],
  console: ['log', 'warn', 'error'],
  buildEnv: {
    local: true,
    dev: true,
    tst: ['warn', 'error'],
    pre: ['error'],
    prod: false
  },
}) 
```

### - Using
```js
// example.vue
export default {
  created() {
    this.$log('TEST VUE-CONSOLES LOG', 'LOG')
    this.$info('TEST VUE-CONSOLES LOG', 'INFO')
    this.$warn('TEST VUE-CONSOLES LOG', 'WARN')
    this.$error('TEST VUE-CONSOLES LOG', 'ERROR')
    this.$debug('TEST VUE-CONSOLES LOG', 'DEBUG')
  }
};
```
## Options
| Key | Value | Type | Default | Description |
| --- |:---:|:---:|:---:|---|
| `currentEnv` | key of `buildEnv` | String | local | Current Build Env( ex: dev ) |
| `prefix` | Any | Array | ['_ENV_'] | Log Prefix Keyword <br><b>Reserved Key</b> <br>`_ENV_`: `currentEnv`<br>`_TIME_`: Now Time(TZ) |
|`console`| Console type | Array | ['log', 'info', 'debug', 'warn', 'error'] | Define the console logs you will use in your project |
| `buildEnv` | {`key`: Boolean or Array } | Object | {local: true} | Console settings to use by project environment <br> `false`: Can't not used <br>`true`: Use all types set in `console` <br> `Array`: Use only the set type. |

## Issue or Bug
 - [Creating an issue](https://github.com/khs9339/vue-consoles/issues)
 
## TODO
- [ ] using in vuex  
- [ ] using in typescript base
- [ ] History Cashe

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