1.0.3 • Published 3 years ago
vue-consoles v1.0.3
Vue Consoles
Window Console Log Plugin For Vue Based
Install
npm i -s vue-consoles
yarn add vue-consoles
Test
npm run test
Usage
- Settings
// 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
// 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 Reserved Key _ENV_ : currentEnv _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 false : Can't not used true : Use all types set in console Array : Use only the set type. |
Issue or Bug
TODO
- using in vuex
- using in typescript base
- History Cashe
- Vue3 CompositionAPI
1.0.4-alpha.1
3 years ago
1.0.4-alpha.0
3 years ago
1.0.4-alpha.3
3 years ago
1.0.4-alpha.2
3 years ago
1.0.4-beta.0
3 years ago
1.0.4-beta.1
3 years ago
1.0.4-beta.2
3 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago