New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reload

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reload - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

2.4.0 / 2018-12-02
------------------
* Added new `-f` or `--fallback` command-line flag. See: MR https://github.com/alallier/reload/pull/167. Issue: https://github.com/alallier/reload/issues/164
* Allow HTML pages to be routed with `.html`. See: MR https://github.com/alallier/reload/pull/167. Issue: https://github.com/alallier/reload/issues/166
2.3.1 / 2018-08-06

@@ -2,0 +7,0 @@ ------------------

12

lib/reload-server.js

@@ -18,3 +18,4 @@ var http = require('http')

var startPage = argv._[5]
var verbose = (argv._[6] === 'true')
var fallback = (argv._[6] === 'true')
var verbose = (argv._[7] === 'true')

@@ -37,6 +38,13 @@ var reloadOpts = {

var fileEnding = pathname.split('.')[1]
var noFileEnding = fileEnding === undefined
if (fileEnding === 'html' || pathname === '/' || pathname === '') { // Server side inject reload code to html files
if (fileEnding === 'html' || pathname === '/' || pathname === '' || noFileEnding) { // Server side inject reload code to html files
if (pathname === '/' || pathname === '') {
pathname = dir + '/' + startPage
} else if (noFileEnding) {
if (fs.existsSync(dir + '/' + pathname + '.html')) {
pathname = dir + '/' + pathname + '.html'
} else if (fallback) {
pathname = dir + '/' + startPage
}
} else {

@@ -43,0 +51,0 @@ pathname = dir + '/' + pathname

2

package.json
{
"name": "reload",
"version": "2.3.1",
"version": "2.4.0",
"description": "Node.js module to refresh and reload your code in your browser when your code changes. No browser plugins required.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc