Socket
Socket
Sign inDemoInstall

copy-and-watch

Package Overview
Dependencies
37
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    copy-and-watch

Synchronize files or folders locally, with a watch option


Version published
Weekly downloads
5.5K
decreased by-2.39%
Maintainers
1
Install size
3.34 MB
Created
Weekly downloads
 

Readme

Source

copy-and-watch

Node.js CI

Synchronize files and folders locally by glob patterns, watch option included.

Install

npm i -D copy-and-watch

Usage

copy-and-watch [options] <sources> <target>

options:
  --watch - enable file watcher
  --clean - clean target folder on start
  --skip-initial-copy - skip copying files initially, only copy if they change. Must be used with `--watch` argument.

In your package.json

You may have some build script in your package.json involving mirroring folders (let's say, static assets), that's a good use-case for copy-and-watch:

{
  "devDependencies": {
    "copy-and-watch": "latest"
  },
  "scripts": {
    "build": "copy-and-watch src/**/*.{html,json} src/**/fonts/* dist/",
    "watch": "copy-and-watch --watch src/**/*.{html,json} src/**/{fonts,images}/* dist/"
  }
}

Changelog

0.1.7
  • Check file existence before removal (by mt3o)
0.1.4
  • Added support for —skip-initial-copy argument (by mugli)
0.1.2
  • Fixed copy on dir bug (by arnarthor)

Keywords

FAQs

Last updated on 09 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc