{"_id":"cpx-fixed","_rev":"2-ef2b9d548fee33faaa5892edecccfc8c","name":"cpx-fixed","dist-tags":{"latest":"1.6.0"},"versions":{"1.5.0":{"name":"cpx-fixed","version":"1.5.0","description":"Copy file globs, watching for changes.","engines":{"node":">=6.5"},"main":"lib/index.js","bin":{"cpx-fixed":"bin/index.js"},"scripts":{"_mocha":"_mocha \"test/*.js\" --timeout 15000","clean":"rimraf .nyc_output coverage test-ws","codecov":"nyc report -r lcovonly && codecov","coverage":"nyc report -r lcov && opener coverage/lcov-report/index.html","lint":"eslint bin lib test","postversion":"git push && git push --tags","pretest":"npm run -s lint","preversion":"npm test","test":"nyc npm run -s _mocha","watch":"npm run -s _mocha -- --watch --growl"},"dependencies":{"co":"^4.6.0","debounce":"^1.1.0","debug":"^3.1.0","duplexer":"^0.1.1","fs-extra":"^6.0.1","glob":"^7.1.2","glob2base":"0.0.12","minimatch":"^3.0.4","resolve":"^1.8.1","safe-buffer":"^5.1.2","shell-quote":"^1.6.1","subarg":"^1.0.0"},"devDependencies":{"@mysticatea/eslint-plugin":"^5.0.1","babel-plugin-istanbul":"^5.1.1","babel-preset-power-assert":"^2.0.0","codecov":"^3.0.2","eslint":"^5.0.1","mocha":"^5.2.0","nyc":"^13.3.0","opener":"^1.4.3","p-event":"^2.0.0","power-assert":"^1.6.0","rimraf":"^2.6.2","shelljs":"^0.8.2","through":"^2.3.8"},"repository":{"type":"git","url":"git+https://github.com/VizualAbstract/cpx.git"},"keywords":["cp","cli","tool","commandline","sync","rsync","watch","observe","copy","dir","directory","directories","file","files"],"author":{"name":"VizualAbstract"},"license":"MIT","bugs":{"url":"https://github.com/VizualAbstract/cpx/issues"},"homepage":"https://github.com/VizualAbstract/cpx#readme","gitHead":"035d4bcfc33137d459638466da955f004b49c73e","_id":"cpx-fixed@1.5.0","_nodeVersion":"10.16.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-6bTGM+n15svImvQTyZjILAA7eBIPtJnpbyZxtVjqDsebqjQnQHqaLfxN0Hr+OyS0+jlyaVYIAMrOYsDyb/1vNA==","shasum":"bdbc2f50b65ebdb5025a63c88e3c0d26e4833534","tarball":"https://registry.npmjs.org/cpx-fixed/-/cpx-fixed-1.5.0.tgz","fileCount":20,"unpackedSize":66737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FTMCRA9TVsSAnZWagAAz9YP/iHWqrS5kTmGLE+vAg5D\nHj6t5D8bhsj6IBUgoFjdGNgxGnBNMqWrYYcM5QgIIW6urq1zt+K192565NRc\neCRmGY7kcSnROHPlmMqechDW4L2vjrM9480yo1FTpQalaBSXdf4o6O4tGgzF\nenYKRN4ItWB3dLev2WyffAdR4gE6kDbAr79LsH6GZlsoFY3Hs0DzcFLYbiLM\ntetq16vBEyxg2xfXXlQohn0+WY0zLMOtyGl7DND5RxdMdSV0PLRuqDi8zq87\n23m0EJs4J+D1UXHEBGVSRWI2XRWRLDuQnootkU5SQPsFfsmI1fSXmGJlgljM\nZtxfe9CCHCvtVAvTVoPWqj4YeJoubFlq/IN5sKUFhVk9g/ltRja5nqlgzvbd\nSQDoQuoEPxIKjF9dGN3NWG6QJMKqnL2FRdeOeq9QdyTrAKKOjiAwDi/SCXUX\nEgDOwfxL/P2Eyu44HyClhW2h7UrtdQH0thGkMeqCbC/0Xm6XZS1Dd6u3+r71\n3MrnOkUJwwB1FcIsYrzmQf27DE6eBaCOcAQqMDlKWhSj0iaSzRB4gHFDcsn2\nZA1BAHPyA3hLRI13aVJSb/D75Gz0dIXOiH0asHsORUO/1G/PKChfdFOkGHyp\nNS3zz5riXd810C4i6gs+ZVFvBzFlETBuOY+KgayyDiB2qVBuNiKmq0sw3WVs\nJ5r9\r\n=ayOF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC82EdnZ6yuhHApoMj/56Nz56FbI6JejyYabCeDzu37egIhAIMArGrovUVkOmToiy0ZxzhWXUQpALFX9YAUmGL6eNhh"}]},"maintainers":[{"name":"vizualabstract","email":"corey.capetillo+npm@gmail.com"}],"_npmUser":{"name":"vizualabstract","email":"corey.capetillo+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cpx-fixed_1.5.0_1574196428381_0.6990891321898507"},"_hasShrinkwrap":false},"1.6.0":{"name":"cpx-fixed","version":"1.6.0","description":"Copy file globs, watching for changes.","engines":{"node":">=6.5"},"main":"lib/index.js","bin":{"cpx-fixed":"bin/index.js"},"scripts":{"_mocha":"_mocha \"test/*.js\" --timeout 15000","clean":"rimraf .nyc_output coverage test-ws","codecov":"nyc report -r lcovonly && codecov","coverage":"nyc report -r lcov && opener coverage/lcov-report/index.html","lint":"eslint bin lib test","postversion":"git push && git push --tags","pretest":"npm run -s lint","preversion":"npm test","test":"nyc npm run -s _mocha","watch":"npm run -s _mocha -- --watch --growl"},"dependencies":{"co":"^4.6.0","debounce":"^1.1.0","debug":"^3.1.0","duplexer":"^0.1.1","fs-extra":"^6.0.1","glob":"^7.1.2","glob2base":"0.0.12","minimatch":"^3.0.4","resolve":"^1.8.1","safe-buffer":"^5.1.2","shell-quote":"^1.6.1","subarg":"^1.0.0"},"devDependencies":{"@mysticatea/eslint-plugin":"^5.0.1","babel-plugin-istanbul":"^5.1.1","babel-preset-power-assert":"^2.0.0","codecov":"^3.0.2","eslint":"^5.0.1","mocha":"^5.2.0","nyc":"^13.3.0","opener":"^1.4.3","p-event":"^2.0.0","power-assert":"^1.6.0","rimraf":"^2.6.2","shelljs":"^0.8.2","through":"^2.3.8"},"repository":{"type":"git","url":"git+https://github.com/VizualAbstract/cpx.git"},"keywords":["cp","cli","tool","commandline","sync","rsync","watch","observe","copy","dir","directory","directories","file","files"],"author":{"name":"VizualAbstract"},"license":"MIT","bugs":{"url":"https://github.com/VizualAbstract/cpx/issues"},"homepage":"https://github.com/VizualAbstract/cpx#readme","gitHead":"bd82696501333482d05025a9b71307055d954066","_id":"cpx-fixed@1.6.0","_nodeVersion":"10.16.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-0X6cfGWup886yM/ma/3I2DASv+QSDhlvPoSzHi1DZrYwl7QIFvSKtk60i2kTyRvUbxzrqLwP1At/1TSD2pGCqg==","shasum":"1b67b38d6319bd87b165700e80b681c41af151a8","tarball":"https://registry.npmjs.org/cpx-fixed/-/cpx-fixed-1.6.0.tgz","fileCount":20,"unpackedSize":66743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1GbECRA9TVsSAnZWagAAAGwP/2aYMXyY+pTubOzrOqXT\n55FGEuq3ULWefMRIQInAvYtvijA38es+JT86/x6NhaiyOKzjYi4Mt81Kl0ZN\nFvTaR+oZ/gQUmLVUXIeFTCvx+Zw62QEfaOuiuQXLwRWPTbQMqoXPwew7/RJJ\nzthw46xNHOnrn9JXqzlGTF+yYn5j6fRls9Ux5Nb5NEe5Oc83uLfLv9cxzSCD\nT8pIvJkFkJRiGZNl+g6TG8nGVCN6vC8gQdipGBqHG5keyy3okb0Zh43EsMtQ\nPRksf40cWEOVFg/919QAta/QiK4mo7qgPo8qB2D2W1/30BpS0diUwiYjUAb7\nSBi5Ek4loGtJqYYfllOo8zM0NAEdFo4kwegzP0SS52WSqe7yZiQzXC6hOQdS\ntLntOuSYR7YDcjN4VOPNMlkwKxGLyOA3gRgmjKxfxTqblCrjDtzMLF/4dYF4\nZE/Gh8lRZNhoUsQfSQ1WrbBaJT0uVi7EBAlkDP/OOgyP7ZYpJMnm3hcYSv6b\nbuYi+pPk2gdua2CSL44svsYsOMAGmkXb4X29tnG7e1z7ecv7jD8F28w4KeBx\n2Y4BIIEVS5D4PQer6jG0vSkeAtz4kDjipKWTkmcW0JolpfJwG6llnxvXhDIZ\n6Lyo1/Uhy63eoGH+CO5xSyf22hjKh4zMcqv5zHZ54VIpS/ct1K4SSNPEGtnA\nAv+u\r\n=AlNj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXP+dUvEemdoLDeen8ahUV3bmz9wKg8O/pej9Hxg1BBQIhAKOyD83Ba+ILqvdbabZ12dAoR1VzKRyg7PXAiaCyEfLI"}]},"maintainers":[{"name":"vizualabstract","email":"corey.capetillo+npm@gmail.com"}],"_npmUser":{"name":"vizualabstract","email":"corey.capetillo+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cpx-fixed_1.6.0_1574201028384_0.49614976987510384"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-19T20:47:08.380Z","1.5.0":"2019-11-19T20:47:08.519Z","modified":"2022-04-27T18:48:34.645Z","1.6.0":"2019-11-19T22:03:48.481Z"},"maintainers":[{"name":"vizualabstract","email":"corey.capetillo+npm@gmail.com"}],"description":"Copy file globs, watching for changes.","homepage":"https://github.com/VizualAbstract/cpx#readme","keywords":["cp","cli","tool","commandline","sync","rsync","watch","observe","copy","dir","directory","directories","file","files"],"repository":{"type":"git","url":"git+https://github.com/VizualAbstract/cpx.git"},"author":{"name":"VizualAbstract"},"bugs":{"url":"https://github.com/VizualAbstract/cpx/issues"},"license":"MIT","readme":"# cpx\n\n[![npm version](https://img.shields.io/npm/v/cpx.svg)](https://www.npmjs.com/package/cpx)\n[![Downloads/month](https://img.shields.io/npm/dm/cpx.svg)](http://www.npmtrends.com/cpx)\n[![Build Status](https://travis-ci.org/mysticatea/cpx.svg?branch=master)](https://travis-ci.org/mysticatea/cpx)\n[![codecov](https://codecov.io/gh/mysticatea/cpx/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/cpx)\n[![Dependency Status](https://david-dm.org/mysticatea/cpx.svg)](https://david-dm.org/mysticatea/cpx)\n\nCopy file globs, watching for changes.\n\nThis module provides a CLI tool like `cp`, but with watching.\n\n\n## Installation\n\n```\nnpm install cpx\n```\n\n- Requires Node.js `>=6.5`.\n\n## Usage\n\n```\nUsage: cpx <source> <dest> [options]\n\n    Copy files, watching for changes.\n\n        <source>  The glob of target files.\n        <dest>    The path of a destination directory.\n\nOptions:\n\n    -c, --command <command>   A command text to transform each file.\n    -C, --clean               Clean files that matches <source> like pattern in\n                              <dest> directory before the first copying.\n    -L, --dereference         Follow symbolic links when copying from them.\n    -h, --help                Print usage information.\n    --include-empty-dirs      The flag to copy empty directories which is\n                              matched with the glob.\n    --no-initial              The flag to not copy at the initial time of watch.\n                              Use together '--watch' option.\n    -p, --preserve            The flag to copy attributes of files.\n                              This attributes are uid, gid, atime, and mtime.\n    -t, --transform <name>    A module name to transform each file. cpx lookups\n                                the specified name via \"require()\".\n    -u, --update              The flag to not overwrite files on destination if\n                              the source file is older.\n    -v, --verbose             Print copied/removed files.\n    -V, --version             Print the version number.\n    -w, --watch               Watch for files that matches <source>, and copy\n                              the file to <dest> every changing.\n```\n\n\n## Example\n\n```\n$ cpx \"src/**/*.{html,png,jpg}\" app --watch\n```\n\nThis example will copy html/png/jpg files from `src` directory to `app`\ndirectory, keeping file tree structure.\nWhenever the files are changed, copy them.\n\n> Since Bash expands globs, requires to enclose it with double quotes.\n\nYou can use together [Browserify](http://browserify.org).\n\n```\n$ cpx \"src/**/*.{html,png,jpg}\" app -w & watchify src/index.js -o app/index.js\n```\n\nYou can use shell commands to convert each file.\n\n```\n$ cpx \"src/**/*.js\" app -w -c \"babel --source-maps inline\"\n```\n\nYou can use the transform packages for Browserify.\n\n```\n$ cpx \"src/**/*.js\" app -w -t babelify -t uglifyify\n```\n\nIt maybe can use to add header comment, to optimize images, or etc...\n\n\n## Node.js API\n\nYou can use this module as a node module.\n\n```js\nvar cpx = require(\"cpx\");\n```\n\n### cpx.copy\n\n```ts\ncpx.copy(source, dest, options, callback)\ncpx.copy(source, dest, callback)\n```\n\n- **source** `{string}` -- A file glob of copy targets.\n- **dest** `{string}` -- A file path of a destination directory.\n- **options** `{object}`\n  - **options.clean** `{boolean}` -- The flag to remove files that copied on past before copy. Default: `false`.\n  - **options.dereference** `{boolean}` -- The flag to follow symbolic links when copying from them. Default: `false`.\n  - **options.includeEmptyDirs** `{boolean}` -- The flag to copy empty directories which is matched with the glob. Default: `false`.\n  - **options.initialCopy** `{boolean}` -- The flag to not copy at the initial time of watch. This is for `cpx.watch()`. Default: `true`.\n  - **options.preserve** `{boolean}` -- The flag to copy uid, gid, atime, and mtime of files. Default: `false`.\n  - **options.transform** `{((filepath: string) => stream.Transform)[]}` -- Functions that creates a `stream.Transform` object to transform each copying file.\n  - **options.update** `{boolean}` -- The flag to not overwrite files on destination if the source file is older. Default: `false`.\n- **callback** `{(err: Error|null) => void}` -- A function that is called at done.\n\nCopy files that matches with `source` glob to `dest` directory.\n\n### cpx.copySync\n\n```ts\ncpx.copySync(source, dest, options)\ncpx.copySync(source, dest)\n```\n\nA synchronous function of `cpx.copy`.\n\nArguments is almost same as `cpx.copy`.\nBut `options.transform` is not supported.\n\n### cpx.watch\n\n```ts\ncpx.watch(source, dest, options)\ncpx.watch(source, dest)\n```\n\nCopy files that matches with `source` glob string to `dest` directory.\nAfter the first copy, starts observing.  And copy the files when every changes.\n\nArguments is same as `cpx.copy`.\n\n`cpx.watch` returns an `EventEmitter`.\n\n- `.on(\"copy\", (e) => { ... })` : Be fired after file is copied. `e.srcPath` is a path of original file. `e.dstPath` is a path of new file.\n- `.on(\"remove\", (e) => { ... })` : Be fired after file is removed. `e.path` is a path of removed file.\n- `.on(\"watch-ready\", () => { ... })` : Be fired when started watching files, after the first copying.\n- `.on(\"watch-error\", (err) => { ... })` : Be fired when occured errors during watching.\n\n## Changelog\n\n[GitHub Releases](https://github.com/mysticatea/cpx/releases)\n\n## Contributing\n\nThank you for contributions!\n\n### Bug Reports or Feature Requests\n\nPlease use GitHub Issues.\n\n### Document Corrections\n\nPlease use GitHub Pull Requests.\nI would especially thank for document corrections since I'm not familiar with English.\n\n### Feature Implementing\n\nPlease use GitHub Pull Requests.\n\nThere are some npm-scripts to help developments.\n\n- `npm test` - Run tests and collect coverage.\n- `npm run build` - Make lib directory from src directory.\n- `npm run clean` - Delete directories (folders) which are created by other commands.\n- `npm run lint` - Run ESLint.\n- `npm run watch` - Run tests (not collect coverage) when each file was modified.\n- `npm run open-coverage` - Open the coverage report of the last `npm test` command with web browser.\n","readmeFilename":"README.md"}