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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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:
2026-01-04 07:17:05 +01:00
parent 4a77ba188a
commit 6a098d425e
2 changed files with 6 additions and 51913 deletions

View File

@@ -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",