Skip to content

Commit

Permalink
Add a deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparshith Nairbalige Rai committed Oct 11, 2018
1 parent 5f02ea7 commit 15a1b8c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/utilities/is-live-reload-request.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
'use strict';

const cleanBaseUrl = require('clean-base-url');
const deprecate = require('./deprecate');

module.exports = function isLiveReloadRequest(url, liveReloadPrefix) {
return url === `${cleanBaseUrl(liveReloadPrefix)}livereload`;
let regex = /\/livereload$/gi;
if (url === `${cleanBaseUrl(liveReloadPrefix)}livereload`) {
return true;
} else if (regex.test(url)) {
//version needs to be updated according to the this PR (https://github.com/ember-cli/ember-cli-inject-live-reload/pull/55)
//in master of ember-cli-inject-live-reload.
deprecate(`Upgrade ember-cli-inject-live-reload version to 1.10.0 or above`, true);
return true;
}
return false;
};

0 comments on commit 15a1b8c

Please sign in to comment.