Skip to content

Commit

Permalink
Adding clean-base-url as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparshith Nairbalige Rai committed Jul 23, 2018
1 parent 63b8c66 commit 92f52a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
18 changes: 1 addition & 17 deletions index.js
@@ -1,22 +1,6 @@
'use strict';

function buildLiveReloadPath(prefix) {
prefix = prefix !== undefined ? prefix : '/';

var rootUrl = prefix;

// Add trailing slash
if (prefix[prefix.length - 1] !== '/') {
rootUrl = rootUrl + '/';
}

// Add leading slash
if (prefix[0] !== '/') {
rootUrl = '/' + rootUrl;
}

return rootUrl;
}
var buildLiveReloadPath = require('clean-base-url');

module.exports = {
name: 'live-reload-middleware',
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -17,7 +17,9 @@
},
"author": "Robert Jackson",
"license": "MIT",
"dependencies": {},
"dependencies": {
"clean-base-url": "^1.0.0"
},
"devDependencies": {},
"repository": {
"type": "git",
Expand Down

0 comments on commit 92f52a7

Please sign in to comment.