Skip to main content

Configuration

Supported file formats

  • a better-scripts property in package.json (⭐️ Recommended)
  • scripts.json (⭐️⭐️ Recommended)
See more formats

  • better-scripts.json
  • .better-scriptsrc
  • .better-scriptsrc.json
  • .better-scriptsrc.yaml
  • .better-scriptsrc.yml
  • .better-scriptsrc.js
  • .better-scriptsrc.cjs
  • better-scriptsrc.config.js
  • better-scriptsrc.config.cjs

Specification

scripts.json
{
"dev": {
"alias": "🌟 Dev",
"command": "react-scripts start",
"desc": "Start a development server",
}
}

Config Object

PropertyTypeDescriptionRequired
scriptNameScript: string | array | objectThe key of the Script object

Script Object

PropertyTypeDescriptionRequired
aliasstring🥳 Displayed name. Defaults to scriptName
commandstringThe key of the script object
desc | describe | descriptionstringExplain what this script does
scriptsConfig: objectNested child scripts. Run step by step
prescriptConfig: ScriptPre-runs. Same as npm.
postscriptConfig: ScriptPost-runs. Same as npm.
envEnv: objectCross-platform environment virables
TS Interface
interface UserConfig {
alias?: string;
command?: string;
desc?: string;
description?: string;
describe?: string;
scripts?: UserConfig;
prescript?: Valueof<UserConfig>;
postscript?: Valueof<UserConfig>;
env?: {
[key: string]: string;
};
}