-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ae9921
commit e02d57d
Showing
6 changed files
with
38 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import std/osproc | ||
import std/strutils | ||
import std/strformat | ||
|
||
proc add*(dev=false, args:seq[string]):int = | ||
## = `bun add xx`. Add a dependency to package.json | ||
let packages = args.join(" ") | ||
let isDev = if dev: "-d" else: "" | ||
echo execProcess(&"bun add {isDev} {packages}") |
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,4 +1,5 @@ | ||
import std/osproc | ||
|
||
proc install*() = | ||
## = `bun install`. Install dependencies for a package.json | ||
echo execProcess("bun install") |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import std/osproc | ||
import std/strutils | ||
import std/strformat | ||
|
||
proc remove*(args:seq[string]):int = | ||
## = `bun remove xx`. Remove a dependency from package.json | ||
let packages = args.join(" ") | ||
echo execProcess(&"bun remove {packages}") |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import std/osproc | ||
|
||
proc update*() = | ||
## = `bun update`. Update outdated dependencies. | ||
echo execProcess("bun update") |
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