Skip to content

Commit

Permalink
feat: add pre-commit hook and update installation instructions for lo…
Browse files Browse the repository at this point in the history
…cal development
  • Loading branch information
serebano committed Dec 26, 2024
1 parent b43e379 commit f021ec3
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 124 deletions.
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "pre comit"

exit 1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Install
```sh
curl -fsSL https://debuno.dev/install | sh
curl -fsSL http://0.0.0.0:8000/install | sh
```

```ts
Expand Down
2 changes: 1 addition & 1 deletion dist/cli.js

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

73 changes: 0 additions & 73 deletions dist/package-B56U5CMV.js

This file was deleted.

74 changes: 74 additions & 0 deletions dist/package-SONM5TVL.js

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

19 changes: 9 additions & 10 deletions install
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#!/bin/sh

_IS_DEV=false
_DENO_BIN=$HOME/.deno/bin/debuno

_BASE=$(dirname $(realpath $0))
_INSTALL_DIR=$HOME/.debuno

rm -rf $_INSTALL_DIR

if [ -d $_BASE/.git ]; then
_IS_DEV=true
_INSTALL_DIR=$_BASE

echo "Installing debuno in dev mode..."
echo "INSTALL_DIR: $_INSTALL_DIR"
else
if [ "$0" = "sh" ]; then
echo "Installing debuno..."
echo "INSTALL_DIR: $_INSTALL_DIR"
echo

git clone https://github.com/serebano/debuno.git $_INSTALL_DIR
else
_INSTALL_DIR=$(dirname $(realpath $0))

echo "Installing debuno in dev mode..."
echo "INSTALL_DIR: $_INSTALL_DIR"
echo
fi

_BIN_DIR=$_INSTALL_DIR/bin
Expand Down
79 changes: 40 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
{
"name": "debuno",
"version": "0.1.10",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/serebano/debuno.git"
"name": "debuno",
"version": "0.1.10",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/serebano/debuno.git"
},
"homepage": "https://github.com/serebano/debuno",
"description": "Bring Deno module resolution to Bun & Node",
"scripts": {
"build": "./build.ts && ./version.ts",
"prepublishOnly": "bun run build",
"dev:node": "node --import debuno --watch example/app.ts",
"dev:bun": "bun --preload debuno --watch example/app.ts",
"prepare": "husky"
},
"bin": "./cli.ts",
"exports": {
".": {
"bun": "./bun/index.ts",
"node": "./node/index.js"
},
"homepage": "https://github.com/serebano/debuno",
"description": "Bring Deno module resolution to Bun & Node",
"scripts": {
"build": "./build.ts && ./version.ts",
"prepublishOnly": "bun run build",
"dev:node": "node --import debuno --watch example/app.ts",
"dev:bun": "bun --preload debuno --watch example/app.ts"
"./register": {
"bun": "./bun/register.ts",
"node": "./node/register.js"
},
"bin": "./cli.ts",
"exports": {
".": {
"bun": "./bun/index.ts",
"node": "./node/index.js"
},
"./register": {
"bun": "./bun/register.ts",
"node": "./node/register.js"
},
"./api": {
"bun": "./shared/api.ts",
"deno": "./shared/api.ts",
"types": "./shared/api.ts",
"import": "./dist/shared/api.js"
},
"./package.json": "./package.json"
"./api": {
"bun": "./shared/api.ts",
"deno": "./shared/api.ts",
"types": "./shared/api.ts",
"import": "./dist/shared/api.js"
},
"engines": {
"deno": "2.1.4",
"bun": "1.1.40",
"node": "22.9.0"
},
"dependencies": {
"bun-types": "^1.1.42"
}
}
"./package.json": "./package.json"
},
"engines": {
"deno": "2.1.4",
"bun": "1.1.40",
"node": "22.9.0"
},
"dependencies": {
"bun-types": "^1.1.42"
}
}
2 changes: 1 addition & 1 deletion scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
# Debuno
if [ "$(which debuno)" != "" ];
then
echo " Debuno: $(debuno -v) $(which debuno)"
echo " Debuno: $(debuno -v) $(realpath $(which debuno))"
else
echo " Debuno: not installed"
fi
Expand Down

0 comments on commit f021ec3

Please sign in to comment.