chore: add unicorn.log for logging with 🦄

This commit is contained in:
abhijithvijayan 2020-04-28 23:56:51 +05:30
parent 8a948631da
commit 565c6589e6
5 changed files with 20 additions and 8 deletions

View File

@ -29,6 +29,7 @@
"dependencies": {
"@babel/runtime": "^7.9.2",
"advanced-css-reset": "^1.1.0",
"unicorn.log": "^1.7.0",
"webext-base-css": "^1.0.0",
"webextension-polyfill": "^0.6.0"
},
@ -72,7 +73,7 @@
"webpack-extension-reloader": "^1.1.4",
"webpack-fix-style-only-entries": "^0.4.0",
"wext-manifest-loader": "^1.1.2",
"wext-manifest-webpack-plugin": "^1.0.3",
"wext-manifest-webpack-plugin": "^1.1.0",
"zip-webpack-plugin": "^3.0.0"
}
}

View File

@ -1,8 +1,9 @@
import 'unicorn.log';
import browser from 'webextension-polyfill';
browser.runtime.onInstalled.addListener(() => {
// eslint-disable-next-line no-console
console.log('onInstalled....');
console.unicorn('onInstalled....');
});
browser.runtime.onMessage.addListener((_request, _sender, _sendResponse) => {

View File

@ -1,2 +1,4 @@
import 'unicorn.log';
// eslint-disable-next-line no-console
console.log('Hello World from options main file!');
console.unicorn('Hello World from options main file!');

View File

@ -1,3 +1,4 @@
import 'unicorn.log';
import browser from 'webextension-polyfill';
function openWebPage(url) {
@ -18,7 +19,7 @@ document.addEventListener('DOMContentLoaded', async () => {
});
// eslint-disable-next-line no-console
console.log(response);
console.unicorn(response);
document.getElementById('github__button').addEventListener('click', () => {
return openWebPage(

View File

@ -7881,6 +7881,11 @@ unicode-property-aliases-ecmascript@^1.0.4:
resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57"
integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==
unicorn.log@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/unicorn.log/-/unicorn.log-1.7.0.tgz#3056eb5fc883252a39f04b8d0078a97a8bdf3f18"
integrity sha512-40ww3Kr4wXJvtMxJEC0rBzMn3vfxIYrRWziYuxnxBmPjplQGxg4KFOJ5oGRAtbGEhLi56vCCueEHcvd/k7am2Q==
union-value@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
@ -8164,10 +8169,12 @@ wext-manifest-loader@^1.1.2:
loader-utils "^2.0.0"
schema-utils "^2.6.5"
wext-manifest-webpack-plugin@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/wext-manifest-webpack-plugin/-/wext-manifest-webpack-plugin-1.0.3.tgz#63e376e88c1a6899faaffc57274791555fbcf830"
integrity sha512-OPrUp0WdgRoicktmpURd1SpQB4VJQmB7J382Ez1kHkufuY31W10No/bdkcVzTBa8WwonIWG5wXqO9fmp4tNu7w==
wext-manifest-webpack-plugin@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/wext-manifest-webpack-plugin/-/wext-manifest-webpack-plugin-1.1.0.tgz#8915aed90753e963d3706bba7c80fb30054bfdcc"
integrity sha512-85pMcfG4UWyO7VBVc0biyeHnBHaHwdwtr6aG7u3L231h2/F0zvezOCyy1/tkiyE6ZrKFxV42r7CS1GC9668EUA==
dependencies:
unicorn.log "^1.7.0"
which-module@^1.0.0:
version "1.0.0"