Skip to content

refactor: Refactor build script and improve workflow#10

Merged
mitsuki31 merged 3 commits intomasterfrom
refactor/streamline-build-workflow
Dec 11, 2025
Merged

refactor: Refactor build script and improve workflow#10
mitsuki31 merged 3 commits intomasterfrom
refactor/streamline-build-workflow

Conversation

@mitsuki31
Copy link
Owner

Overview

The build pipeline has been dragged out of its dusty corner and brought up to a more reasonable standard. The script now behaves consistently, does its work asynchronously, and drops a couple of options that were only pretending to be useful. Development and release workflows should feel less clunky after this update.

Changes Made

  • Refactored the minification workflow to run in parallel using Promise.all, replacing the previous single-shot processing.
  • Removed the --overwrite option from the build script.
  • General internal code improvements across the build file.
  • Switched TypeScript execution from ts-node to tsx for better runtime ergonomics.
  • Replaced all synchronous functions with asynchronous counterparts to unify the code path.
  • Adjusted build script to always apply --minify option by default.
  • Modified dev script so that it performs a plain build without minification.
  • Updated development dependency @types/node to version 20.19.25.

Impact

The build process becomes faster due to proper parallelization and more predictable thanks to consistent async usage. The removal of unnecessary options reduces surface complexity. Developers should see smoother iteration during development and a more stable automated build during releases. The version bump for Node types is minor and low-risk.

Summary

The build system has been tuned up: faster, cleaner, and more consistent. Development is quieter now, with fewer knobs pretending to matter and a more modern execution path under the hood.

- Changed the TS files runner, `ts-node` -> `tsx`
- Replaced all sync functions with async for consistency
- The `npm run build` script will now always use `--minify` and
  `--overwrite` options
- Updated the `npm run dev` script to build the project without
  any options (i.e., no `--minify`)
- Improved the minify process to use parallel async instead
  processing all files in-one-go (use `Promise.all(<array>.map(...))`)
- Removed the `--overwrite` option
- Several code improvements
@mitsuki31 mitsuki31 self-assigned this Dec 11, 2025
@mitsuki31 mitsuki31 added enhancement New feature or request patch Patch changes (e.g., hotfix bugs and issues) refactor Refactor changes labels Dec 11, 2025
@mitsuki31
Copy link
Owner Author

Looks like Node.js v16.x are no longer supported with current dependencies and causing build failed. However, Node.js v18.x are still supported.

@mitsuki31 mitsuki31 force-pushed the refactor/streamline-build-workflow branch from e9c8828 to 8038710 Compare December 11, 2025 07:41
@mitsuki31 mitsuki31 merged commit 15c1669 into master Dec 11, 2025
4 checks passed
@mitsuki31 mitsuki31 deleted the refactor/streamline-build-workflow branch December 11, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request patch Patch changes (e.g., hotfix bugs and issues) refactor Refactor changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant