This file contains 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
/** | |
* Example usages | |
* | |
* deno run -A LINK_TO_RAW_OF_THIS_GIST | |
* | |
* deno run -A LINK_TO_RAW_OF_THIS_GIST \ | |
* --path "/path/to/your/folder/with/data" | |
* | |
* deno run -A LINK_TO_RAW_OF_THIS_GIST \ | |
* --path "/path/to/your/folder/with/data" \ |
This file contains 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
/** | |
* Cross-link dependencies of local projects using yarn. | |
* The main use-case of this script is when you have 2 or more projects set up locally, | |
* first is a monorepo containing dependencies to the 2nd project which consumes them. | |
* | |
* Required dependencies: | |
* You need to have `find`, `sh` and `which` installed. | |
* `which` has to see `yarn` from within target project's path. | |
* All dependencies has to be visible to spawned `/bin/sh` so most likely this script | |
* can't be sandboxed. |
This file contains 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 { parseArgs } from "https://deno.land/[email protected]/cli/parse_args.ts"; | |
const args = parseArgs(Deno.args, { | |
string: [ "node_version", "project_path", "filters" ] | |
}); | |
const requiredArg = (argument: unknown, argumentName: string) => { | |
if (!argument) { | |
console.log(`${argumentName} is required`); | |
Deno.exit(); |