Skip to content

Commit 4273607

Browse files
yzalvovAkryum
authored andcommitted
fix: HMR typo in console logs (#325)
Otherwise "HRM" in a console looks confusing.
1 parent c3c43c2 commit 4273607

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/vue-component-dev-client/client/dev-client.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const infoStyle = 'font-style: italic; color: #326ABC;'
1414
let VueHotReloadApi
1515
const vueVersion = parseInt(Vue.version.charAt(0))
1616

17-
console.log('%cHRM%c You are using Vue %c' + Vue.version, tagStyle, 'color: #177D4F;', 'color: #177D4F; font-weight: bold;')
17+
console.log('%cHMR%c You are using Vue %c' + Vue.version, tagStyle, 'color: #177D4F;', 'color: #177D4F; font-weight: bold;')
1818

1919
console.log('%cYou are currently in development mode. If the Hot-Module-Replacement system is enabled (`on` by default), the CSS will be injected to the page after the scripts are loaded. This may result in Flash Of Unstyled Contents. Those will not occur in production.', infoStyle)
2020

@@ -54,14 +54,14 @@ Reload._reload = function (options) {
5454

5555
// Custom reload method
5656
function reload (options) {
57-
console.log('%cHRM', tagStyle, 'Reload request received')
57+
console.log('%cHMR', tagStyle, 'Reload request received')
5858
if (_deferReload !== 0) {
5959
setTimeout(_reload, _deferReload)
60-
console.log(`%cHRM`, tagStyle, `Client reload defered, will reload in ${_deferReload} ms`)
60+
console.log(`%cHMR`, tagStyle, `Client reload defered, will reload in ${_deferReload} ms`)
6161
} else if (_suppressNextReload) {
62-
console.log(`%cHRM%c ⥁ Client version changed, reload suppressed because of a recent HMR update. You may need to reload the page.`, tagStyle, 'color: #F36E00;')
62+
console.log(`%cHMR%c ⥁ Client version changed, reload suppressed because of a recent HMR update. You may need to reload the page.`, tagStyle, 'color: #F36E00;')
6363
} else {
64-
console.log(`%cHRM`, tagStyle, `Reloading app...`)
64+
console.log(`%cHMR`, tagStyle, `Reloading app...`)
6565
_reload.call(Reload, options)
6666
}
6767
_suppressNextReload = false
@@ -82,14 +82,14 @@ if (ClientVersions) {
8282
changed: checkNewVersionDocument,
8383
})
8484
} else {
85-
console.warn('%cHRM', tagStyle, 'ClientVersions collection is not available, the app may full reload.')
85+
console.warn('%cHMR', tagStyle, 'ClientVersions collection is not available, the app may full reload.')
8686
}
8787

8888
Meteor.startup(function () {
8989
// Dev client
9090
let devUrl = __meteor_runtime_config__.VUE_DEV_SERVER_URL
9191

92-
console.log('%cHRM%c Dev server URL: %c' + devUrl, tagStyle, '', 'font-weight: bold;')
92+
console.log('%cHMR%c Dev server URL: %c' + devUrl, tagStyle, '', 'font-weight: bold;')
9393

9494
console.log(`%cIf you have issues connecting to the dev server, set the 'HMR_URL' env variable to the URL of the dev server displayed in the meteor console.`, infoStyle)
9595

@@ -98,10 +98,10 @@ Meteor.startup(function () {
9898
window.__dev_client__ = _socket
9999

100100
_socket.on('connect', function () {
101-
console.log('%cHRM%c ⏺ Dev client connected', tagStyle, 'color: #177D4F;')
101+
console.log('%cHMR%c ⏺ Dev client connected', tagStyle, 'color: #177D4F;')
102102
})
103103
_socket.on('disconnect', function () {
104-
console.log('%cHRM%c ⏺ Dev client disconnected', tagStyle, 'color: #F36E00;')
104+
console.log('%cHMR%c ⏺ Dev client disconnected', tagStyle, 'color: #F36E00;')
105105
})
106106

107107
// JS
@@ -140,7 +140,7 @@ Meteor.startup(function () {
140140

141141
let needsReload = false
142142
if (!error) {
143-
console.log('%cHRM', tagStyle, 'Reloading ' + path)
143+
console.log('%cHMR', tagStyle, 'Reloading ' + path)
144144
if (!result.default.render && !template) {
145145
error = true
146146
}
@@ -164,7 +164,7 @@ Meteor.startup(function () {
164164
// Template
165165
_socket.on('render', function ({hash, template, path}) {
166166
if (vueVersion === 2) {
167-
console.log('%cHRM', tagStyle, 'Rerendering ' + path)
167+
console.log('%cHMR', tagStyle, 'Rerendering ' + path)
168168
let error = false
169169
try {
170170
var obj
@@ -200,7 +200,7 @@ Meteor.startup(function () {
200200
// Refresh
201201
VueHotReloadApi.updateWatchers()
202202
}
203-
console.log(`%cHRM`, tagStyle, `Updated locale ${lang}`)
203+
console.log(`%cHMR`, tagStyle, `Updated locale ${lang}`)
204204
_suppressNextReload = true
205205
})
206206
_socket.on('langs.updated', function ({langs}) {
@@ -217,7 +217,7 @@ Meteor.startup(function () {
217217
} else {
218218
func = console.log
219219
}
220-
func(`%cHRM`, tagStyle, message)
220+
func(`%cHMR`, tagStyle, message)
221221
})
222222

223223
// Reg

0 commit comments

Comments
 (0)