Skip to content

Commit

Permalink
add postcommit
Browse files Browse the repository at this point in the history
  • Loading branch information
victorekpo committed Jul 13, 2024
1 parent b0837d6 commit 7e51f9f
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# .husky/post-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

sh ./.husky/postcommit.sh

8 changes: 8 additions & 0 deletions .husky/postcommit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
FILE="./client/wrangler.toml"
if [ -f "$FILE" ]; then
mv ~/tmp.wrangler.toml $FILE
else
echo "$FILE does not exist."
fi

3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

sh ./.husky/precommit.sh

sh ./.husky/precommit.sh
1 change: 1 addition & 0 deletions .husky/precommit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
FILE="./client/wrangler.toml"
if [ -f "$FILE" ]; then
cp $FILE ~/tmp.wrangler.toml
sed -i -e 's/account_id = ".*"/account_id = "**********"/' $FILE
echo "$FILE updated"
git add -A
Expand Down
2 changes: 1 addition & 1 deletion client/assets/pages.js

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

2 changes: 1 addition & 1 deletion client/assets/partials.js

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

2 changes: 1 addition & 1 deletion client/src/utils/hbsAsyncHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const registerHBHelper = () => registerAsyncHelper(Handlebars,'asyncTest'
return new Promise((resolve, reject) => {
setTimeout(
function() {
resolve(`Async render with params: ${options.hash.name} || ${options.hash.age}`)
resolve(`Async render with params: ${options.hash.name}`)
},
200
);
Expand Down
2 changes: 1 addition & 1 deletion client/src/views/pages/body.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<strong>Your name:</strong> {{name}}
</p>

<pre>{{asyncTest name='Vic Tester' age=38}}</pre>
<pre>{{asyncTest name='Vic Tester'}}</pre>

</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion client/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name = "tech"
account_id = "**********"
workers_dev = true
compatibility_date = "2024-07-11"
compatibility_date = "2024-07-11"

[build]
command="npm run build"
watch_dir="views/"g

0 comments on commit 7e51f9f

Please sign in to comment.