|
| 1 | +<h1 align="center">@compactjs/clipboard</h1> |
| 2 | +<h3 align="center">Copy to clipboard.</h3> |
| 3 | +<p align="center"> |
| 4 | + <a href="https://www.npmjs.com/package/@compactjs/clipboard" target="_blank"> |
| 5 | + <img alt="Version" src="https://img.shields.io/npm/v/@compactjs/clipboard.svg"> |
| 6 | + </a> |
| 7 | + <a href="https://github.com/CompactJS/clipboard/blob/master/LICENSE" target="_blank"> |
| 8 | + <img alt="License: MIT" src="https://img.shields.io/github/license/CompactJS/clipboard" /> |
| 9 | + </a> |
| 10 | +</p> |
| 11 | +<p align="center"> |
| 12 | + · |
| 13 | + <a href="https://github.com/CompactJS/clipboard#readme">Homepage</a> |
| 14 | + · |
| 15 | + <a href="https://compactjs.github.io/clipboard">View Demo</a> |
| 16 | + · |
| 17 | + <a href="https://github.com/CompactJS/clipboard/issues">Report Bug / Request Feature</a> |
| 18 | + · |
| 19 | +</p> |
| 20 | + |
| 21 | +## Table of Contents |
| 22 | + |
| 23 | +- [Installation](#Install) |
| 24 | +- [Usage](#usage) |
| 25 | +- [Test](#run-tests) |
| 26 | +- [Contact](#contact) |
| 27 | +- [Contributing](#Contributing) |
| 28 | +- [License](#license) |
| 29 | + |
| 30 | +## Install |
| 31 | + |
| 32 | +### NPM: |
| 33 | + |
| 34 | +```sh |
| 35 | +npm install @compactjs/clipboard |
| 36 | +``` |
| 37 | + |
| 38 | +### CDN: |
| 39 | + |
| 40 | +```html |
| 41 | +<script src="https://unpkg.com/@compactjs/clipboard/dist/index.umd.js"></script> |
| 42 | +``` |
| 43 | + |
| 44 | +## Usage |
| 45 | + |
| 46 | +### As module: |
| 47 | + |
| 48 | +```javascript |
| 49 | +import { clipboard } from '@compactjs/clipboard'; |
| 50 | +``` |
| 51 | + |
| 52 | +### Example: |
| 53 | + |
| 54 | +```javascript |
| 55 | +document |
| 56 | + .getElementById('copy-string') |
| 57 | + .addEventListener('click', () => |
| 58 | + clipboard('This text is going to be copied.') |
| 59 | + ); |
| 60 | +``` |
| 61 | + |
| 62 | +Have a look at the [example](https://github.com/CompactJS/clipboard/blob/master/example/index.html). |
| 63 | + |
| 64 | +Or checkout the [demo](https://compactjs.github.io/clipboard). |
| 65 | + |
| 66 | +## Run tests |
| 67 | + |
| 68 | +```sh |
| 69 | +npm run test |
| 70 | +``` |
| 71 | + |
| 72 | +## Contact |
| 73 | + |
| 74 | +👤 **Timo Bechtel** |
| 75 | + |
| 76 | +- Website: https://timobechtel.com |
| 77 | +- Twitter: [@TimoBechtel](https://twitter.com/TimoBechtel) |
| 78 | +- GitHub: [@TimoBechtel](https://github.com/TimoBechtel) |
| 79 | + |
| 80 | +## 🤝 Contributing |
| 81 | + |
| 82 | +Contributions, issues and feature requests are welcome!<br /> |
| 83 | + |
| 84 | +1. Check [issues](https://github.com/clipboard/clipboard/issues) |
| 85 | +1. Fork the Project |
| 86 | +1. Create your Feature Branch (`git checkout -b feat/AmazingFeature`) |
| 87 | +1. Test your changes `npm run test` |
| 88 | +1. Commit your Changes (`git commit -m 'feat: add amazingFeature'`) |
| 89 | +1. Push to the Branch (`git push origin feat/AmazingFeature`) |
| 90 | +1. Open a Pull Request |
| 91 | + |
| 92 | +### Commit messages |
| 93 | + |
| 94 | +This project uses semantic-release for automated release versions. So commits in this project follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) guidelines. I recommend using [commitizen](https://github.com/commitizen/cz-cli) for automated commit messages. |
| 95 | + |
| 96 | +## Show your support |
| 97 | + |
| 98 | +Give a ⭐️ if this project helped you! |
| 99 | + |
| 100 | +## 📝 License |
| 101 | + |
| 102 | +Distributed under the [MIT](https://github.com/clipboard/clipboard/blob/master/LICENSE) License. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_ |
0 commit comments