-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve deno command path alias translation
Translate path alias for deno command
- Loading branch information
1 parent
913cc55
commit 81b7b3e
Showing
10 changed files
with
228 additions
and
44 deletions.
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
import { parseArgs } from "jsr:@std/cli/parse-args" | ||
import sharp from "npm:sharp" | ||
|
||
console.log("deno-script") | ||
// make a file on desktop with deno | ||
// const desktopPath = path.join(os.homedir(), "Desktop") | ||
// fs.writeFileSync(path.join(desktopPath, "deno-script.txt"), "deno-script") | ||
// how to get desktop path | ||
const HOME = Deno.env.get("HOME") | ||
// print cwd | ||
console.log("CWD:", Deno.cwd()) | ||
await Deno.writeTextFile(`./hello2.txt`, "Hello World!"); | ||
// await Deno.writeTextFile(`${HOME}/Desktop/hello.txt`, "Hello World!"); | ||
const args = parseArgs(Deno.args) | ||
console.log(args) | ||
// await Deno.writeTextFile("./hello.txt", "Hello World!") | ||
// console.log("File written to ./hello.txt") | ||
|
||
const input = args.i | ||
const output = args.o | ||
|
||
sharp(input).blur(10).resize(300, 300).toFile(output) |
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
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
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