1 | # Copy Pack [![npm-latest]][npm]
|
2 |
|
3 | > Simply copy files.
|
4 |
|
5 | ## Overview
|
6 |
|
7 | - [Setup](#setup)
|
8 | - [API](#api)
|
9 | - [Usage](#usage)
|
10 | - [License](#license)
|
11 |
|
12 | ## Setup
|
13 |
|
14 | `Copy Pack` is included in the [`complete`][edition-complete] and [`default`][edition-default] editions.
|
15 |
|
16 | **Current Release**
|
17 |
|
18 | ```bash
|
19 | npm install --save-dev @packmule/copy-pack
|
20 | ```
|
21 |
|
22 | **Nightly Build**
|
23 |
|
24 | ```bash
|
25 | npm install --save-dev @packmule/copy-pack@nightly
|
26 | ```
|
27 |
|
28 | ## API
|
29 |
|
30 | ```typescript
|
31 | CopyPack()
|
32 | .include(glob: string)
|
33 | .to(path: string)
|
34 | ```
|
35 |
|
36 | ### Hints
|
37 |
|
38 | - **hash** - _Configures whether file name hashing is enabled or not._
|
39 |
|
40 | ## Usage
|
41 |
|
42 | **Example**
|
43 |
|
44 | Copy JSON files.
|
45 |
|
46 | ```typescript
|
47 | import Packmule from '@packmule/core';
|
48 | import CopyPack from '@packmule/copy-pack';
|
49 |
|
50 | const packmule = new Packmule();
|
51 | packmule.add(new CopyPack().include('**/data/*.json').to('data/'));
|
52 | return packmule.generate();
|
53 | ```
|
54 |
|
55 | ## License
|
56 |
|
57 | [MIT](https://choosealicense.com/licenses/mit/)
|
58 |
|
59 | ---
|
60 |
|
61 | [<img src="https://avatars.githubusercontent.com/u/4364197?s=64">](https://www.pixelart.at/)
|
62 |
|
63 | [packmule-hints]: https://www.npmjs.com/package/@packmule/core#hints
|
64 | [packmule-api]: https://www.npmjs.com/package/@packmule/core#api
|
65 | [npm]: https://www.npmjs.com/package/@packmule/copy-pack
|
66 | [npm-latest]: https://img.shields.io/npm/v/@packmule/copy-pack/latest?color=%230AC2FF&label=release&style=for-the-badge
|
67 | [edition-default]: https://www.npmjs.com/package/@packmule/default
|
68 | [edition-complete]: https://www.npmjs.com/package/@packmule/complete
|