1.0.5 • Published 3 years ago
@silenteer/run v1.0.5
rr
Run run is a cli to quickly test a library, either in typescript or js. Most of libraries don't expose a executable method to test in cli, and rr is here to solve
getting started
- Add
rrto dev dependencies like -yarn install @silenteer/run - Can use
yarn rr -hto see options
Example
yarn rr ./index.tsto call default export function without any parametersyarn rr ./index.ts --at echo -a 'Hello world'to call methodechoof the export withHello worldas an argument. Argument can be added multiple timesyarn rr ./index.ts --at echo.startto execute method start of the export of theechoinstance
Argument data types
Argument employs a simple syntax to determine data type. These are supported data types for argument
s:<string value>will be use as string valuen:<string value>will be put toNumberb:<string value>will be put toBooleanj:<string value>will be put toJSON.parse
Promise
Promise will be handled accordingly so you don't have to write a file just to wrap the first level await async