Skip to content

Commit

Permalink
remove website, upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
joshraphael committed Sep 29, 2024
1 parent c92d20c commit 341f986
Show file tree
Hide file tree
Showing 69 changed files with 27 additions and 14,759 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,4 @@ package-lock.json
.eslintrc.yml
.eslintrc.js
.SETUP
/public
/minify_test
/website/Gemfile.lock
/website/.sass-cache
/website/.jekyll-cache
/website/_site
/website/public
/website/static/js/srteditor.min.js
/website/api
/website/download/srteditor.*
/minify_test
30 changes: 0 additions & 30 deletions .gitlab-ci.yml

This file was deleted.

24 changes: 24 additions & 0 deletions example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"></meta>
<title>
SRTEditor Example
</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="srteditor.min.js"></script>
<script>
$(document).ready(function () {
$("#srteditor").srteditor({
"Submit": function(e) {
console.log(e.data.doc.body.innerHTML);
}
}, "<h3>This is a test</h3>");
});
</script>
</head>
<body>
<iframe id="srteditor"></iframe>
</body>
</html>
9 changes: 0 additions & 9 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ if [ $? -ne 0 ]; then
fi
success "Sourced setup script"
if [ ! -f ".SETUP" ]; then
npm install -g eslint
if [ $? -ne 0 ]; then
error "Could not install ESLint"
fi
success "Installed ESLint"
npm install -g uglify-js
if [ $? -ne 0 ]; then
error "Could not install uglify-js"
Expand All @@ -26,10 +21,6 @@ if [ ! -f srteditor.js ]; then
error "srteditor.js does not exist"
fi
success "srteditor.js exists"
eslint srteditor.js
if [ $? -ne 0 ]; then
error "Could not lint srteditor.js"
fi
uglifyjs srteditor.js > srteditor.min.js
if [ $? -ne 0 ]; then
error "Could not minify srteditor.js"
Expand Down
35 changes: 0 additions & 35 deletions scripts/lint.sh

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/meta.sh

This file was deleted.

45 changes: 0 additions & 45 deletions scripts/mirror_setup.sh

This file was deleted.

5 changes: 0 additions & 5 deletions setup-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ if [ ! -f ".SETUP" ]; then
error "Could not install uglify-js"
fi
success "Installed uglify-js"
npm install -g eslint
if [ $? -ne 0 ]; then
error "Could not install ESLint"
fi
success "Installed ESLint"
cp $DIR/scripts/setup.sh $DIR/.git/hooks
if [ $? -ne 0 ]; then
error "Could not copy setup script into hooks"
Expand Down
38 changes: 2 additions & 36 deletions startup.sh
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WEBSITE=$DIR/website
WEBSITE_API=$WEBSITE/api
WEBSITE_JS=$WEBSITE/static/js
WEBSITE_DOWNLOAD=$WEBSITE/download
DEFAULT_PORT=4000
mkdir -p $WEBSITE_JS
mkdir -p $WEBSITE_API
mkdir -p $WEBSITE_DOWNLOAD
if [[ $1 == "--deploy" ]]; then
bash scripts/meta.sh $1 > $WEBSITE_API/meta.json
apt-get update
apt-get install zip
else
if [[ ! -z "$PORT" ]]; then
if [[ ! ($PORT =~ ^([0-9]{1,5})$ && $PORT -gt 1499 && $PORT -lt 65536) ]]; then
echo "Bad port, setting to default: $DEFAULT_PORT"
PORT=$DEFAULT_PORT
fi
else
PORT=$DEFAULT_PORT
fi
bash scripts/meta.sh $PORT > $WEBSITE_API/meta.json
fi
zip $WEBSITE_DOWNLOAD/srteditor.zip srteditor.js srteditor.min.js README.md LICENSE
tar -cf $WEBSITE_DOWNLOAD/srteditor.tar srteditor.js srteditor.min.js README.md LICENSE
cd $WEBSITE
if [[ $1 != "--deploy" ]]; then
uglifyjs $DIR/srteditor.js > $DIR/srteditor.min.js
fi
cp $DIR/srteditor.min.js $WEBSITE_JS
bundle install
if [[ $1 == "--deploy" ]]; then
bundle exec jekyll build -d $DIR/public
else
bundle exec jekyll serve --host 0.0.0.0 --port $PORT
fi
uglifyjs $DIR/srteditor.js > $DIR/srteditor.min.js
python3 -mwebbrowser example.html
2 changes: 0 additions & 2 deletions website/Gemfile

This file was deleted.

17 changes: 0 additions & 17 deletions website/_config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions website/_includes/footer.html

This file was deleted.

8 changes: 0 additions & 8 deletions website/_includes/header.html

This file was deleted.

85 changes: 0 additions & 85 deletions website/_includes/loader.html

This file was deleted.

Loading

0 comments on commit 341f986

Please sign in to comment.