Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

james-reload

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

james-reload

browser reload plugin for james.js

  • 0.5.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

James-reload

Browser reload plugin for James.js

Requirements

  • Node.js
  • NPM

Installation

npm install -g james-reload

Binary

jreload -s <source port> -p <port to proxy to> -w <list of globs to watch>

Example

jreload -s 9001 -p 9002 -w js/**/*.js,js/**/*.hbs

More information

jreload --help

API

Basic configuration

var reloadFactory = require('james-reload');
var reload = reloadFactory({
  srcPort: 80,
  proxyPort: 9002
});

Reads content from port 80 and proxies it to port 9002 with the client side script appended

Example usage

var reloadFactory = require('james-reload');
var reload = reloadFactory({
  srcPort: 80,
  proxyPort: 9002
});

setTimeout(function() {
  reload();
}, 5000)

Reloads your browsers location after 5 seconds.


reloadFactory(config)

Returns a function reload for sending a signal when client should reload content ####config (Object)

  • srcPort: (Number)
    • Port to read from
    • Default: 9001
  • proxyPort: (Number)
    • Proxy where the content is proxied
    • Default: 9002
  • keepReconnecting (Boolean)
    • Try reconnection if proxy request fails
    • Default: true
  • reloadAfterReconnect
    • Reload client location when websocket connection disconnects and connects again
    • Default: true
  • debug
    • console.log errors and info messages
    • Default: false

reload(config)

signals client script to reload content ####config (Object)

  • stylesheetsOnly: (Boolean)
    • Tell client script to only reload stylesheet files if set to true
    • Default: false

Keywords

FAQs

Package last updated on 10 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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