Skip to content

A simple NodeJS script runner with TOML instead of JSON

License

Notifications You must be signed in to change notification settings

gfrancine/tomlrun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tomlrun

A dead simple script runner with TOML as an alternative to package.json scripts.

TOML supports single-quote strings, multi-line strings, comments, and other features meant for more human configuration files. A script runner based on it would support longer commands better than a JSON one.

tomlrun also looks for commands in your node_modules/.bin directory the way npm run would.

Install

Install it globally:

npm i -g tomlrun

Or install it in your package so you could add it to your package.json:

npm i -D tomlrun

Usage

Have a scripts.toml file in your project's root directory:

# A simple command:
sayhello = "echo hello"

# A command in a multi-line string:
format = """prettier --write \
  **.js **.jsx \
  **.ts **.tsx \
  """

Run the script and optionally pass arguments into it:

# tomlrun <script> [...args]
tomlrun sayhello world
hello world

About

A simple NodeJS script runner with TOML instead of JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published