Skip to content

Commit

Permalink
refactor: use zx
Browse files Browse the repository at this point in the history
zx is a much simpler way to run commands.
It's a much higher level library than child_process,
so the code is much simpler to read.
Length-wise, it's about the same, but slightly longer,
primarily because Prettier wraps lists but not strings.
I also converted the remaining bits of sync io to async io,
as async io is only faster the more you use it.
It also encourages function coloring,
which makes it more explicit where there's io.
(Yes, I know function coloring is generally a bad thing.)
  • Loading branch information
lishaduck committed Dec 5, 2024
1 parent a4a1d1c commit d9021f3
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 250 deletions.
107 changes: 106 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
"ls-engines": "^0.9.3",
"prettier": "^2.8.8",
"turbo": "^2.2.3",
"typescript": "~5.6.3"
"typescript": "~5.6.3",
"zx": "^8.2.4"
},
"packageManager": "[email protected]+sha512.dc700d97c8bd0ca9d403cf4fe0a12054d376f048d27830a6bc4a9bcce02ec42143cdd059ce3525f7dce09c6a4e52e9af5b996f268d8729c8ebb1cfad7f2bf51f",
"engines": {
Expand Down
22 changes: 22 additions & 0 deletions test/run-snapshots/new-package.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
- Adding elm.json
✔ Adding elm.json
- Adding package.json
✔ Adding package.json
- Adding elm-tooling.json
✔ Adding elm-tooling.json
- Adding README
✔ Adding README
- Adding preview folder
✔ Adding preview folder
- Adding rule - No.Doing.Foo
✔ Adding rule - No.Doing.Foo
- Adding .gitignore
✔ Adding .gitignore
- Adding GitHub Actions
✔ Adding GitHub Actions
- Adding LICENSE npx license BSD-3-Clause
✔ Adding LICENSE npx license BSD-3-Clause
- Adding elm-review configuration
✔ Adding elm-review configuration
- Adding maintenance scripts
✔ Adding maintenance scripts

All done! ✔

Expand Down
Loading

0 comments on commit d9021f3

Please sign in to comment.