1 | # Output Pack [![npm-latest]][npm]
|
2 |
|
3 | > Define the [output options](https://webpack.js.org/configuration/output/) for `webpack`.
|
4 |
|
5 | ## Overview
|
6 |
|
7 | - [Setup](#setup)
|
8 | - [API](#api)
|
9 | - [Usage](#usage)
|
10 | - [License](#license)
|
11 |
|
12 | ## Setup
|
13 |
|
14 | `Output 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/output-pack
|
20 | ```
|
21 |
|
22 | **Nightly Build**
|
23 |
|
24 | ```bash
|
25 | npm install --save-dev @packmule/output-pack@nightly
|
26 | ```
|
27 |
|
28 | ## API
|
29 |
|
30 | ```typescript
|
31 | OutputPack(path: string, web: string = '/')
|
32 | ```
|
33 |
|
34 | ## Options
|
35 |
|
36 | - **root** - _Used to build an absolute path of the configured output path._
|
37 |
|
38 | ### Hints
|
39 |
|
40 | - **hash** - _Configures whether file name hashing is enabled or not._
|
41 |
|
42 | ## Usage
|
43 |
|
44 | **Example**
|
45 |
|
46 | Configure the output options for the bundle.
|
47 |
|
48 | ```typescript
|
49 | import Packmule from '@packmule/core';
|
50 | import OutputPack from '@packmule/output-pack';
|
51 |
|
52 | const packmule = new Packmule();
|
53 | packmule.add(new OutputPack('public/', '/'));
|
54 | return packmule.generate();
|
55 | ```
|
56 |
|
57 | ## License
|
58 |
|
59 | [MIT](https://choosealicense.com/licenses/mit/)
|
60 |
|
61 | ---
|
62 |
|
63 | [<img src="https://avatars.githubusercontent.com/u/4364197?s=64">](https://www.pixelart.at/)
|
64 |
|
65 | [packmule-hints]: https://www.npmjs.com/package/@packmule/core#hints
|
66 | [packmule-api]: https://www.npmjs.com/package/@packmule/core#api
|
67 | [npm]: https://www.npmjs.com/package/@packmule/output-pack
|
68 | [npm-latest]: https://img.shields.io/npm/v/@packmule/output-pack/latest?color=%230AC2FF&label=release&style=for-the-badge
|
69 | [edition-default]: https://www.npmjs.com/package/@packmule/default
|
70 | [edition-complete]: https://www.npmjs.com/package/@packmule/complete
|