Skip to content
This repository was archived by the owner on Sep 7, 2024. It is now read-only.
/ rexample Public archive
generated from NuroDev/npm-template

πŸƒβ€β™‚οΈ Simple CLI to execute & run scripts

License

Notifications You must be signed in to change notification settings

NuroDev/rexample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation



πŸƒβ€β™‚οΈ
rexample




Simple CLI to execute & run scripts



πŸš€ Install

You have a few options to install the CLI:

# Locally
npm install --save-dev rexample

# Globally
npm install -g rexample

# npx
npx rexample

πŸ¦„ Usage

To get started using the CLI simply create a new example script you want to run.

The only requirement is that the script exports a default function to execute. The reason for this is due to avoid module import automatic code execution.

For example, here is a basic script that will log "Hello world!" to the console:

// examples/basic.ts
function main() {
  console.log("Hello world!");
}

export default main;

Then simply run the CLI, either by passing in the name of the file or by selecting it from the list:

# Run the CLI & select a script to run
rexample

And you will get the the output of your selected script:

Hello world!

About

πŸƒβ€β™‚οΈ Simple CLI to execute & run scripts

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •