Created
December 29, 2020 13:42
-
-
Save nksaraf/c67b49e2e40d925e270e4fb581da1132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shellac = require('shellac').default; | |
shellac` | |
$$ node scripts.js ${process.argv.slice(1).join(' ')} | |
` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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