Enable minification for build artifact (#60)
### **PR Type**
Enhancement
___
### **Description**
- Enable minification in build script.
- Produce minified `dist/index.js` bundle.
___
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>package.json</strong><dd><code>Add minification flag to build script</code> </dd></summary>
<hr>
package.json
- Added `-m` flag to build script.
</details>
</td>
<td><a href="https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/package.json">+1/-1</a> </td>
</tr>
</table></td></tr><tr><td><strong>Build artifact</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>index.js</strong><dd><code>Provide minified distribution bundle</code> </dd></summary>
<hr>
dist/index.js
- Updated output to minified bundle.
</details>
</td>
<td><a href="https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/dist/index.js">+5/-51912</a></td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
Reviewed-on: #60
This commit is contained in:
51917
dist/index.js
vendored
51917
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
"test": "vitest run --globals --coverage",
|
||||
"build": "ncc build index.js -o dist --external utf-8-validate --external bufferutil"
|
||||
"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^2.0.0",
|
||||
|
||||
Reference in New Issue
Block a user