{"_id":"@amathron/copy-file-to-clipboard-win","name":"@amathron/copy-file-to-clipboard-win","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@amathron/copy-file-to-clipboard-win","version":"1.0.0","description":"Copy File To Clipboard (Win)","main":"dist/AmathronUtilClipboardWin.cjs","module":"dist/AmathronUtilClipboardWin.mjs","types":"dist/AmathronUtilClipboardWin.d.ts","scripts":{"build":"unbuild && node copyAssets.mjs","test":"ts-mocha -p tsconfig.test.json test/**/*.spec.ts","test1":"mocha -r ts-node/register 'test/**/*.ts'"},"repository":{"type":"git","url":"git+https://github.com/maxwowpow/a-npm-copyfile-clipboard-win.git"},"keywords":["productivity"],"author":{"name":"Amathron","url":"https://amathron.com"},"license":"MIT","bugs":{"url":"https://github.com/maxwowpow/a-npm-copyfile-clipboard-win/issues"},"homepage":"https://github.com/maxwowpow/a-npm-copyfile-clipboard-win#readme","devDependencies":{"@types/chai":"^4.3.11","@types/expect":"^24.3.0","@types/glob":"^8.0.0","@types/inquirer":"^9.0.7","@types/jest":"^29.5.11","@types/mocha":"^10.0.6","@types/node":"^16.18.70","@types/sinon":"^17.0.2","@typescript-eslint/eslint-plugin":"^6.18.1","@typescript-eslint/parser":"^6.18.1","axios":"^1.6.5","eslint":"^8.56.0","glob":"^8.0.3","inquirer":"^9.2.12","mocha":"^10.2.0","sinon":"^17.0.1","ts-mocha":"^10.0.0","ts-node":"^10.9.2","typescript":"^5.3.3","unbuild":"^2.0.0"},"dependencies":{},"_id":"@amathron/copy-file-to-clipboard-win@1.0.0","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-lsxiYr3zL+FMD+tzvMs0+zDkckNvYroZ1fNaD5qokBgV+n6b+zsL0MxKO+8i/GlyhyFGbCM+GmtY5nNyOMulnQ==","shasum":"bd662e03e048c6b6cba32c36481d6ecd2638feb6","tarball":"https://registry.npmjs.org/@amathron/copy-file-to-clipboard-win/-/copy-file-to-clipboard-win-1.0.0.tgz","fileCount":9,"unpackedSize":12222,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1d97hZnoA/KWxXoZH8HZ25C2phqra/hbQX7IBYux85AiEAljeYjhMDSssFOCSJ9YSUKzqg0uIUswARs0JW5DsC16U="}]},"_npmUser":{"name":"maxwowpow","email":"npm@maxgrass.eu"},"directories":{},"maintainers":[{"name":"maxwowpow","email":"npm@maxgrass.eu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/copy-file-to-clipboard-win_1.0.0_1704775214320_0.156938286361189"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-09T04:40:14.257Z","1.0.0":"2024-01-09T04:40:14.471Z","modified":"2024-01-09T04:40:14.778Z"},"maintainers":[{"name":"maxwowpow","email":"npm@maxgrass.eu"}],"description":"Copy File To Clipboard (Win)","homepage":"https://github.com/maxwowpow/a-npm-copyfile-clipboard-win#readme","keywords":["productivity"],"repository":{"type":"git","url":"git+https://github.com/maxwowpow/a-npm-copyfile-clipboard-win.git"},"author":{"name":"Amathron","url":"https://amathron.com"},"bugs":{"url":"https://github.com/maxwowpow/a-npm-copyfile-clipboard-win/issues"},"license":"MIT","readme":"# Amathron Copy File To Clipboard (Windows)\n\n# AmathronUtilClipboard\n\n`AmathronUtilClipboardWin` is a Node.js utility module for copying file paths to the Windows clipboard asynchronously. It is especially useful in desktop and command-line applications where integrating clipboard operations is required. It uses PowerShell to interact with the clipboard as this is the most straightforward way without involving extra apps.\n\n## Installation\n\nTo install `AmathronUtilClipboardWin`, use npm:\n\n```bash\nnpm install @amathron/copy-file-to-clipboard-win\n```\n\nOr if you are using Yarn:\n\n```bash\nyarn add @amathron/copy-file-to-clipboard-win\n```\n\n## Usage\n\nHere's a quick example to get you started:\n\n```typescript\nimport AmathronUtilClipboardWin from '@amathron/copy-file-to-clipboard-win';\n\nasync function copyFiles() {\n    const filePaths = ['path/to/your/file1.txt', 'path/to/your/file2.txt'];\n    \n    try {\n        await AmathronUtilClipboardWin.copyFileToClipboardAsync(filePaths);\n        console.log('Files have been copied to the clipboard.');\n    } catch (error) {\n        console.error('Error copying files to the clipboard:', error);\n    }\n}\n\ncopyFiles();\n```\n\n## API\n\n### `copyFileToClipboardAsync(filePaths: string[]): Promise<string>`\n\n- **Description**: Copies the contents of the specified files to the Windows clipboard.\n- **Parameters**:\n  - `filePaths`: An array of strings, where each string is a path to a file.\n- **Returns**: A promise that resolves to a string indicating success.\n\n## Requirements\n\n- Node.js (version 12 or higher recommended)\n- Windows operating system\n- PowerShell execution must be enabled. This should be the case for most developers working on windows.\n\n## Contributing\n\nContributions to `AmathronUtilClipboardWin` are welcome! Please ensure that your contributions adhere to the following guidelines:\n\n- Write clean, readable code and maintain the existing coding style.\n- Add comments to your code where necessary.\n- Update the README.md with details of changes to the interface or significant changes.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Contact\n\nFor any inquiries or issues, please open an issue on the [GitHub repository](https://github.com/maxwowpow/a-npm-copyfile-clipboard-win).\n\n\n## Release Notes\n\n### 1.0.0\n\nInitial release.\n\n","readmeFilename":"README.md"}