![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bun-scripty
Advanced tools
Bun-Scripty is a tool that enables you to define npm scripts in separate TypeScript files, designed specifically for use with Bun. This project is inspired by the excellent scripty by Test Double.
Instead of packing your package.json
with a long list of scripts, Bun-Scripty allows you to organize each script into its own TypeScript file. This not only keeps your package.json
cleaner but also makes each script easier to manage, debug, and scale.
To install Bun-Scripty, simply run:
bun add bun-scripty
Create a scripts
directory in your project root (you can customize this path later).
Add your TypeScript script files inside this directory. For example, you could add scripts/test.ts
for a test
script.
Make the script files executable with the following command:
chmod +x scripts/test.ts
Update your package.json
to use Bun-Scripty for running your scripts:
{
"scripts": {
"test": "bun-scripty"
}
}
Now, when you run bun run test
, Bun-Scripty will execute the scripts/test.ts
file.
Bun-Scripty supports different delimiters for separating script segments, including :
, and _
. While :
is the standard in npm scripts, it can cause issues with tab autocompletion in some environments, in which case _
may be more reliable.
For instance, the following package.json
configuration will map to scripts/test/unit.ts
:
{
"scripts": {
"test:unit": "bun-scripty",
"test_unit": "bun-scripty"
}
}
By default, Bun-Scripty looks for script files in the scripts
directory. To change this, you can customize the path by adding the following configuration to your package.json
:
{
"config": {
"bun-scripty": {
"scriptPath": "custom/path"
}
}
}
Alternatively, you can set the BUN_SCRIPTY_SCRIPT_PATH
environment variable to the desired path.
export BUN_SCRIPTY_SCRIPT_PATH="custom/path"
.ts
) files.This project is heavily inspired by scripty from Test Double. We extend our gratitude for their well-structured solution, which served as the basis for Bun-Scripty.
This project is licensed under the MIT License.
We welcome contributions! Feel free to submit a pull request with your improvements or ideas.
FAQs
Scripty for Bun
We found that bun-scripty demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.