Skip to content

Instantly share code, notes, and snippets.

@nksaraf
Created December 29, 2020 13:42
Show Gist options
  • Save nksaraf/c67b49e2e40d925e270e4fb581da1132 to your computer and use it in GitHub Desktop.
Save nksaraf/c67b49e2e40d925e270e4fb581da1132 to your computer and use it in GitHub Desktop.
const shellac = require('shellac').default;
shellac`
$$ node scripts.js ${process.argv.slice(1).join(' ')}
`
import meow from 'meow';
import shellac from 'shellac';
export declare type ShellacValueInterpolation = string | boolean | undefined | number | null;
export declare type ShellacInterpolations = ShellacValueInterpolation | Promise<ShellacValueInterpolation> | ((a: string) => void) | ((a: string) => Promise<void>) | (() => Promise<void | ShellacValueInterpolation>);
export { shellac };
export const cli: meow.Result<Record<string, meow.AnyFlag>>;
export const task: (strings: TemplateStringsArray, ...impls: ShellacInterpolations[]) => (() => Promise<void>);
const meow = require('meow');
const shellac = require('shellac').default;
const cli = meow({});
const task = (s, ...args) => {
return async () => {
await shellac(s, ...args)
}
}
module.exports = { cli, shellac, task }
{
"name": "garage-cli",
"version": "0.4.0",
"types": "index.d.ts",
"bin": {
"script": "./cli.js"
},
"dependencies": {
"shellac": "*",
"meow": "*"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment