Skip to content

Commit

Permalink
Remove consola
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgv committed Apr 24, 2018
1 parent a09e34e commit 293142a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 55 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
},
"dependencies": {
"acorn": "^5.5.3",
"consola": "^1.2.0",
"cookie": "^0.3.1",
"fs": "^0.0.1-security",
"vue-i18n": "^7.5.0",
Expand Down
6 changes: 0 additions & 6 deletions src/helpers/logger.js

This file was deleted.

7 changes: 4 additions & 3 deletions src/helpers/routes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logger from './logger'
import { STRATEGIES } from './constants'
import {
MODULE_NAME,
STRATEGIES } from './constants'
import { extractComponentOptions } from './components'
import { getLocaleCodes } from './utils'

Expand Down Expand Up @@ -39,7 +40,7 @@ export const makeRoutes = (baseRoutes, {

// Skip if locale not in module's configuration
if (locales.indexOf(locale) === -1) {
logger.warn(`Can't generate localized route for route '${name}' with locale '${locale}' because locale is not in the module's configuration`)
console.warn(`[${MODULE_NAME}] Can't generate localized route for route '${name}' with locale '${locale}' because locale is not in the module's configuration`)
continue
}

Expand Down
2 changes: 0 additions & 2 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { resolve, join } from 'path'
import { readdirSync } from 'fs'
import i18nExtensions from 'vue-i18n-extensions'

import logger from './helpers/logger'
import {
MODULE_NAME,
ROOT_DIR,
Expand All @@ -23,7 +22,6 @@ import {
} from './helpers/utils'

export default function (userOptions) {
logger.info('Module initialized')
const pluginsPath = join(__dirname, PLUGINS_DIR)
const templatesPath = join(__dirname, TEMPLATES_DIR)
const requiredPlugins = ['main', 'routing']
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/routing.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import './middleware';
import Vue from 'vue'
import consola from 'consola'

const logger = consola.withScope('<%= options.MODULE_NAME %>')

function localePathFactory (i18nPath, routerPath) {
return function localePath (route, locale) {
Expand Down Expand Up @@ -61,7 +59,7 @@ function switchLocalePathFactory (i18nPath) {
}
path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path
} else {
logger.warn('Could not find domain name for locale ' + locale)
console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale)
}
}
return path
Expand Down
5 changes: 1 addition & 4 deletions src/plugins/seo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import Vue from 'vue'
import consola from 'consola'

const logger = consola.withScope('<%= options.MODULE_NAME %>')

Vue.mixin({
head () {
Expand All @@ -27,7 +24,7 @@ Vue.mixin({
hreflang: locale[LOCALE_ISO_KEY]
}
} else {
logger.warn('Locale ISO code is required to generate alternate link')
console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link')
return null
}
})
Expand Down
84 changes: 48 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ autoprefixer@^7.1.1:
postcss "^6.0.17"
postcss-value-parser "^3.2.3"

autoprefixer@^8.2.0:
autoprefixer@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-8.3.0.tgz#22ac5151c3c8946bb8f75f337d5c5042c0ec6404"
dependencies:
Expand Down Expand Up @@ -1174,11 +1174,11 @@ browserslist@^2.0.0, browserslist@^2.1.2, browserslist@^2.11.3:
electron-to-chromium "^1.3.30"

browserslist@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.4.tgz#fb9ad70fd09875137ae943a31ab815ed76896031"
version "3.2.5"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.5.tgz#aa46a5ea33b5330178f3c91cfd85e148fcb57080"
dependencies:
caniuse-lite "^1.0.30000821"
electron-to-chromium "^1.3.41"
caniuse-lite "^1.0.30000830"
electron-to-chromium "^1.3.42"

bser@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -1321,7 +1321,7 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805:
version "1.0.30000817"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000817.tgz#e993c380eb4bfe76a2aed4223f841c02d6e0d832"

caniuse-lite@^1.0.30000821, caniuse-lite@^1.0.30000824, caniuse-lite@^1.0.30000830:
caniuse-lite@^1.0.30000824, caniuse-lite@^1.0.30000830:
version "1.0.30000830"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz#cb96b8a2dd3cbfe04acea2af3c4e894249095328"

Expand Down Expand Up @@ -1354,6 +1354,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52"
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
Expand Down Expand Up @@ -2347,7 +2355,7 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
version "1.3.40"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.40.tgz#1fbd6d97befd72b8a6f921dc38d22413d2f6fddf"

electron-to-chromium@^1.3.41:
electron-to-chromium@^1.3.42:
version "1.3.42"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9"

Expand Down Expand Up @@ -2577,9 +2585,9 @@ eslint@^4.19.1:
table "4.0.2"
text-table "~0.2.0"

esm@^3.0.16:
version "3.0.18"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.0.18.tgz#afdde98572af447637dc1a2841606945aa02dad0"
esm@^3.0.22:
version "3.0.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.0.25.tgz#d374e714c07abe0b8a7e80d18819e5823e491dbd"

espree@^3.5.2, espree@^3.5.4:
version "3.5.4"
Expand Down Expand Up @@ -3368,7 +3376,7 @@ html-minifier@^3.2.3:
relateurl "0.2.x"
uglify-js "3.3.x"

html-minifier@^3.5.14:
html-minifier@^3.5.15:
version "3.5.15"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.15.tgz#f869848d4543cbfd84f26d5514a2a87cbf9a05e0"
dependencies:
Expand Down Expand Up @@ -4959,32 +4967,32 @@ number-is-nan@^1.0.0:
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"

"nuxt@npm:nuxt-edge":
version "2.0.0-25396844.0aea0d5"
resolved "https://registry.yarnpkg.com/nuxt-edge/-/nuxt-edge-2.0.0-25396844.0aea0d5.tgz#5b75559434be053fdd544091c27fe447bf42d38e"
version "2.0.0-25406389.db572a2"
resolved "https://registry.yarnpkg.com/nuxt-edge/-/nuxt-edge-2.0.0-25406389.db572a2.tgz#e683a56a96cf0938613b0fd87fb06f20bfb0f836"
dependencies:
"@nuxtjs/friendly-errors-webpack-plugin" "^2.0.2"
"@nuxtjs/youch" "^4.2.3"
autoprefixer "^8.2.0"
autoprefixer "^8.3.0"
babel-core "^6.26.0"
babel-loader "^7.1.4"
babel-preset-vue-app "^2.0.0"
cache-loader "^1.2.2"
caniuse-lite "^1.0.30000824"
chalk "^2.3.2"
chalk "^2.4.0"
chokidar "^2.0.3"
compression "^1.7.1"
connect "^3.6.5"
consola "^1.3.0"
css-loader "^0.28.11"
es6-promise "^4.2.4"
esm "^3.0.16"
esm "^3.0.22"
etag "^1.8.1"
file-loader "^1.1.11"
fresh "^0.5.2"
fs-extra "^5.0.0"
glob "^7.1.2"
hash-sum "^1.0.2"
html-minifier "^3.5.14"
html-minifier "^3.5.15"
html-webpack-plugin "^3.2.0"
launch-editor-middleware "^2.2.1"
lodash "^4.17.5"
Expand All @@ -4997,17 +5005,17 @@ number-is-nan@^1.0.0:
postcss-cssnext "^3.1.0"
postcss-import "^11.1.0"
postcss-import-resolver "^1.1.0"
postcss-loader "^2.1.3"
postcss-loader "^2.1.4"
postcss-url "^7.3.2"
semver "^5.5.0"
serialize-javascript "^1.4.0"
serialize-javascript "^1.5.0"
serve-static "^1.13.2"
server-destroy "^1.0.1"
std-env "^1.3.0"
style-resources-loader "^1.1.0"
thread-loader "^1.1.5"
time-fix-plugin "^2.0.0"
uglifyjs-webpack-plugin "^1.2.4"
uglifyjs-webpack-plugin "^1.2.5"
upath "^1.0.2"
url-loader "^1.0.1"
vue "^2.5.16"
Expand All @@ -5017,10 +5025,10 @@ number-is-nan@^1.0.0:
vue-server-renderer "^2.5.16"
vue-template-compiler "^2.5.16"
vuex "^3.0.1"
webpack "^4.5.0"
webpack "^4.6.0"
webpack-bundle-analyzer "^2.11.1"
webpack-dev-middleware "^3.1.2"
webpack-hot-middleware "^2.22.0"
webpack-hot-middleware "^2.22.1"
webpack-node-externals "^1.7.2"
webpackbar "^2.6.1"

Expand Down Expand Up @@ -5643,7 +5651,7 @@ postcss-load-plugins@^2.3.0:
cosmiconfig "^2.1.1"
object-assign "^4.1.0"

postcss-loader@^2.1.3:
postcss-loader@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.4.tgz#f44a6390e03c84108b2b2063182d1a1011b2ce76"
dependencies:
Expand Down Expand Up @@ -5925,8 +5933,8 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.11.1:
version "1.12.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.0.tgz#d26fc5894b9230de97629b39cae225b503724ce8"
version "1.12.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"

pretty-error@^2.0.2:
version "2.1.1"
Expand Down Expand Up @@ -6498,7 +6506,7 @@ sax@^1.2.4, sax@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"

schema-utils@^0.4.0, schema-utils@^0.4.2, schema-utils@^0.4.3, schema-utils@^0.4.5:
schema-utils@^0.4.0, schema-utils@^0.4.2, schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e"
dependencies:
Expand Down Expand Up @@ -6531,6 +6539,10 @@ serialize-javascript@^1.3.0, serialize-javascript@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005"

serialize-javascript@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe"

serve-static@1.13.2, serve-static@^1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
Expand Down Expand Up @@ -7224,9 +7236,9 @@ uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"

uglifyjs-webpack-plugin@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz#5eec941b2e9b8538be0a20fc6eda25b14c7c1043"
uglifyjs-webpack-plugin@^1.2.4, uglifyjs-webpack-plugin@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz#2ef8387c8f1a903ec5e44fa36f9f3cbdcea67641"
dependencies:
cacache "^10.0.4"
find-cache-dir "^1.0.0"
Expand Down Expand Up @@ -7561,9 +7573,9 @@ webpack-dev-middleware@^3.1.2:
url-join "^4.0.0"
webpack-log "^1.0.1"

webpack-hot-middleware@^2.22.0:
version "2.22.0"
resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.22.0.tgz#db58c9dd2bd78e7f3868cccb42a20d24b00a7ade"
webpack-hot-middleware@^2.22.1:
version "2.22.1"
resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.22.1.tgz#2ff865bfebc8e9937bd1619f0f48d6ab601bfea0"
dependencies:
ansi-html "0.0.7"
html-entities "^1.2.0"
Expand All @@ -7590,9 +7602,9 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0:
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.5.0.tgz#1e6f71e148ead02be265ff2879c9cd6bb30b8848"
webpack@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.6.0.tgz#363eafa733710eb0ed28c512b2b9b9f5fb01e69b"
dependencies:
acorn "^5.0.0"
acorn-dynamic-import "^3.0.0"
Expand All @@ -7608,7 +7620,7 @@ webpack@^4.5.0:
mkdirp "~0.5.0"
neo-async "^2.5.0"
node-libs-browser "^2.0.0"
schema-utils "^0.4.2"
schema-utils "^0.4.4"
tapable "^1.0.0"
uglifyjs-webpack-plugin "^1.2.4"
watchpack "^1.5.0"
Expand Down

0 comments on commit 293142a

Please sign in to comment.