Introduction
Better scripts is a better way, a CLI tool, a consistent conventional that helps you organize and make better use of your npm scripts.
The benefits
⚡️ Forget about reading redundant package.json
and start doing everything you want with just one single command.
💅🏻 Human readable description and emoji for your scripts.
🔎 Searchable interactive CLI tool to help you find the command you want to run faster.
🧠 Consistent convention to reduce your cognitive load on different projects.
✂️ Simplify your package.json and separate npm scripting to another file like scripts.json
.
⚙️ A more powerful script runner that can inject cross-platform envs, execute commands in serialized and parallel way even chaining.
Quick examples
These examples only show you how it works like, if you already know please follow Getting Started.
Start by one-time command npx better-scripts
, and you will get this.
Now add some descriptions for your scripts into separate scripts.json
file in root.
{
"dev": {
"alias": "🌟 Dev",
"command": "yarn start",
"desc": "Start a development server"
},
"build": {
"alias": "📦 Build",
"command": "yarn build",
"desc": "Create a production build"
},
"test": {
"alias": "🧪 Test",
"command": "yarn test",
"desc": "Run tests"
}
}
Run again, it's cool!
Shows a table list for all of your scripts by running list
command
Use as a runner without interactive