refactor: Refactor build script and improve workflow#10
Merged
Conversation
- 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
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. |
e9c8828 to
8038710
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Promise.all, replacing the previous single-shot processing.--overwriteoption from the build script.ts-nodetotsxfor better runtime ergonomics.buildscript to always apply--minifyoption by default.devscript so that it performs a plain build without minification.@types/nodeto version20.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.