-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
=!
useEffect2
will trigger the callback whenever the dependency arr…
…ay size change, this is different from `useEffect`, but more intuitive ! `useConditionalHooks` will correctly update the result when called hook returns an array
- Loading branch information
Showing
9 changed files
with
771 additions
and
546 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { spawn } from "child_process"; | ||
|
||
const run = (command, args) => { | ||
return new Promise((resolve, reject) => { | ||
const cmd = spawn(command, args, { | ||
stdio: ["ignore", "inherit", "inherit"], | ||
}); | ||
|
||
cmd.on("close", (code) => { | ||
if (!code) { | ||
resolve(); | ||
return; | ||
} | ||
|
||
reject(new Error(`Program exited with code ${code}`)); | ||
}); | ||
|
||
cmd.on("error", () => { | ||
reject(new Error(`Can't start program`)); | ||
}); | ||
}); | ||
}; | ||
|
||
export { | ||
run | ||
} |
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,6 +1,6 @@ | ||
{ | ||
"name": "@ezez/hooks", | ||
"version": "1.2.2", | ||
"version": "2.0.0", | ||
"repository": "[email protected]:dzek69/ezez-hooks.git", | ||
"author": "Jacek Nowacki", | ||
"license": "MIT", | ||
|
@@ -36,9 +36,9 @@ | |
"oop-timers": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.22.8", | ||
"@babel/preset-env": "^7.22.7", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@babel/core": "^7.23.7", | ||
"@babel/preset-env": "^7.23.7", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@dzek69/eslint-config-base": "^2.5.0", | ||
"@dzek69/eslint-config-import": "^1.3.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.1", | ||
|
@@ -61,7 +61,7 @@ | |
"husky": "^8.0.3", | ||
"jest": "^29.6.1", | ||
"must": "^0.13.4", | ||
"next": "^13.4.19", | ||
"next": "^14.0.4", | ||
"nodemon": "^3.0.1", | ||
"prettier": "^2.8.8", | ||
"react": "^18.2.0", | ||
|
Oops, something went wrong.