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

cpx

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpx

Copy file globs, watching for changes.

  • 1.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
248K
decreased by-14.96%
Maintainers
1
Weekly downloads
 
Created

What is cpx?

The cpx npm package is a tool for copying files and directories with various options. It is useful for tasks such as copying files during a build process, synchronizing directories, and more.

What are cpx's main functionalities?

Copy files from source to destination

This command copies all files and directories from the 'src' directory to the 'dist' directory. The glob pattern 'src/**/*' matches all files and directories recursively.

cpx 'src/**/*' dist

Watch mode

This command copies files from 'src' to 'dist' and continues to watch for changes. When a file in the 'src' directory is modified, it will be copied to the 'dist' directory automatically.

cpx 'src/**/*' dist --watch

Include and exclude patterns

This command copies only JavaScript files from 'src' to 'dist', excluding any files that match the '*.test.js' pattern.

cpx 'src/**/*' dist --include='*.js' --exclude='*.test.js'

Clean destination before copying

This command cleans the 'dist' directory before copying files from 'src' to 'dist'. This ensures that the destination directory is empty before the new files are copied.

cpx 'src/**/*' dist --clean

Other packages similar to cpx

Keywords

FAQs

Package last updated on 18 Jul 2015

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