Skip to content

Commit

Permalink
Repo restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
foivospro committed Oct 1, 2024
1 parent db4fd5a commit db1f13d
Show file tree
Hide file tree
Showing 28 changed files with 2,705 additions and 2,709 deletions.
102 changes: 51 additions & 51 deletions bin/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
#!/bin/sh

# Run npm run check to perform checks before committing
npm run format-check

# If npm run check fails (returns non-zero exit code), exit with error
if [ $? -ne 0 ]; then
echo "npm run check failed, aborting commit."
echo "Run 'npm run prettier-fix' to fix formatting issues."
exit 1
fi

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)

# Redirect output to stderr.
exec 1>&2

# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi

# If there are whitespace errors, print the offending file names and fail.
#!/bin/sh

# Run npm run check to perform checks before committing
npm run format-check

# If npm run check fails (returns non-zero exit code), exit with error
if [ $? -ne 0 ]; then
echo "npm run check failed, aborting commit."
echo "Run 'npm run prettier-fix' to fix formatting issues."
exit 1
fi

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)

# Redirect output to stderr.
exec 1>&2

# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi

# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
Binary file modified blockly_unix_database.db
Binary file not shown.
Binary file added db/blockly_unix_database.db
Binary file not shown.
File renamed without changes.
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<script src="https://unpkg.com/@blockly/plugin-scroll-options@latest"></script>
<script src="https://unpkg.com/@blockly/workspace-backpack@latest"></script>
<script src="https://unpkg.com/@blockly/plugin-cross-tab-copy-paste@latest"></script>
<script src="js/el.js"></script>
<script src="msg/en.js"></script>

<!-- <script src="https://unpkg.com/@blockly/block-plus-minus"></script> -->
Expand Down Expand Up @@ -66,8 +65,9 @@
<script src="blocks/regStartBlock.js"></script>
<script src="blocks/regEndBlock.js"></script>
<script src="blocks/regForBlock.js"></script>
<script src="blocks/regAlternationBlock.js"></script>
<script src="blocks/regPatternBlock.js"></script>
<script src="blocks/regRangeBlock.js"></script>
<script src="blocks/regQuantBlock.js"></script>
<script src="blocks/regAnyOneBlock.js"></script>
<script src="blocks/condOutputBlock.js"></script>
<script src="blocks/multiplePrintBlock.js"></script>
Expand Down Expand Up @@ -125,8 +125,8 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
/>
<link id="light-theme" rel="stylesheet" href="styles.css" />
<link id="dark-theme" rel="stylesheet" href="styledark.css" disabled />
<link id="light-theme" rel="stylesheet" href="css/styles.css" />
<link id="dark-theme" rel="stylesheet" href="css/styledark.css" disabled />
</head>
<body>
<div id="navbar">
Expand Down Expand Up @@ -628,6 +628,7 @@
'blockPasteFromStorage'
).weight = 3;
</script>
<script src="main.js"></script>
<script src="js/app.js"></script>
<script src="js/block.js"></script>
</body>
</html>
108 changes: 66 additions & 42 deletions 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 @@ -17,7 +17,7 @@
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"ejs": "^3.1.10",
"express": "^4.19.2",
"express": "^4.21.0",
"express-flash": "^0.0.2",
"express-session": "^1.18.0",
"express-validator": "^7.1.0",
Expand All @@ -32,6 +32,7 @@
"license": "ISC",
"dependencies": {
"@blockly/toolbox-search": "^2.0.8",
"dotenv": "^16.4.5",
"passport-google-oauth20": "^2.0.0",
"sqlite3": "^5.1.7"
}
Expand Down
Loading

0 comments on commit db1f13d

Please sign in to comment.