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

wtch

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wtch - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

2

package.json
{
"name": "wtch",
"version": "2.1.3",
"version": "2.1.4",
"description": "small livereload/watch command line utility",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,3 +5,3 @@ # wtch

A small command-line app that watches for file changes and triggers a live-reload on file save (to be used with the LiveReload plugin). Watches the current working directory for `js,html,css` file changes. Ignores `.git`, `node_modules` and `bower_components` folders.
A small command-line app that watches for file changes and triggers a live-reload on file save (to be used with the [LiveReload plugin](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en)). Watches the current working directory for `js,html,css` file changes. Ignores `.git`, `node_modules` and `bower_components` folders.

@@ -21,3 +21,3 @@ ```sh

See [examples](#examples) for using with browserify, watchify, and other tools.
See [setup](#setup) for a basic how-to, and [tooling](#Tooling) for more advanced uses with browserify, watchify, etc.

@@ -61,4 +61,28 @@ PRs/suggestions welcome.

## Examples
## Setup
First, install the LiveReload plugin for your browser of choice (e.g. [Chrome](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en)).
Now, install some tools globally.
```sh
npm install wtch http-server garnish -g
```
Create a basic `index.html` file that references scripts and/or CSS files.
Then, you can run your development server like so:
```sh
http-server | wtch | garnish
```
Enable LiveReload by clicking the plugin so the center of it turns black. You may need to refresh the page first.
![Click to enable](http://imgur.com/YdCgusY)
Now when you save a JS/HTML/CSS file in the current directory, it will trigger a live-reload event on your `localhost:8080` tab. CSS files will be injected without a page refresh.
## Tooling
This can be used for live-reloading alongside [wzrd](https://github.com/maxogden/wzrd), [beefy](https://github.com/maxogden/beefy) and similar development servers. For example:

@@ -76,8 +100,2 @@

Or, even for a simple site with no JS content. The following example uses [http-server](https://www.npmjs.com/package/http-server) and listens for HTML/CSS changes in the current directory.
```sh
http-server | wtch | garnish
```
See [this package.json's](https://github.com/mattdesl/wtch/blob/master/package.json) script field for more detailed examples.

@@ -84,0 +102,0 @@

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