0.2.5 • Published 7 years ago

plug-live-reload v0.2.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Plug Live Reload


PLR is a simple tool to auto-reload a script on plug.dj when you save the file in your editor, intended to make development easier.

Example:

Gif

How it works


It works by simply connecting to a WebSocket server running on your machine in node, the node app watches the specified file for changes, and pushes the file contents to the script running on plug.dj via the websocket, which then wraps it in a <script> </script> tag in the page

Usage


Firstly, you need to have node.js installed

  1. Install the package globally using npm install --global plug-live-reload
  2. Start the server by typing plr --file path/to/file.js, you can specify another port with the --port option (Default is 1337)
  3. Load the client script on plug either by adding the following bookmark to you bookmarks bar, using the userscript here or by hosting it yourself from this repo.
  4. Type /plron in plug to connect to the socket server, If you've changed the port from the default port, use /plron <port> to specify a port. PLR will rememember the last port you used, and use it the next time you type /plron without any arguments.

Bookmark:

javascript:(function(){$.getScript('https://cdn.rawgit.com/Dazzuh/plug-live-reload/b693cd87/client/client.js');}());

Userscript

Notes


You can disconnect from the server and unload the script by typing /plroff

"file" in config.json is the file the server will watch for changes and load in plug.dj.

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago