Skip to content

Commit

Permalink
Remove old tests from the website (#1733)
Browse files Browse the repository at this point in the history
The website used to host every past test suite, copied into the www
directory. We no longer need that on the website (and it makes the
codebase impossible to search) so I removed all the old tests and the
new tests are hosted simply at /test.

I also replaced the www.js script with a simpler www.sh one (since we no
longer need to do anything besides copying, really), which allowed me to
remove a node dependency that was only used in that script.
  • Loading branch information
alexpetros authored Sep 19, 2023
1 parent 66023f2 commit d1288d2
Show file tree
Hide file tree
Showing 5,334 changed files with 190 additions and 3,616,100 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
87 changes: 2 additions & 85 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test": "mocha-chrome test/index.html",
"test-types": "tsc --project ./jsconfig.json",
"dist": "cp -r src/* dist/ && npm run-script uglify && gzip -9 -k -f dist/htmx.min.js > dist/htmx.min.js.gz && exit",
"www": "node scripts/www.js",
"www": "bash ./scripts/www.sh",
"uglify": "uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js"
},
"repository": {
Expand All @@ -38,7 +38,6 @@
"devDependencies": {
"chai": "^4.3.7",
"chai-dom": "^1.11.0",
"fs-extra": "^9.1.0",
"mocha": "^10.2.0",
"mocha-chrome": "^2.2.0",
"mocha-webdriver-runner": "^0.6.4",
Expand Down
33 changes: 0 additions & 33 deletions scripts/www.js

This file was deleted.

17 changes: 17 additions & 0 deletions scripts/www.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -euo pipefail

STATIC_ROOT="www/static"
PACKAGE_VERSION=$(cat package.json | grep version | cut -d '"' -f 4)


cp node_modules/mocha/mocha.js "$STATIC_ROOT/node_modules/mocha/mocha.js"
cp node_modules/mocha/mocha.css "$STATIC_ROOT/node_modules/mocha/mocha.css"
cp node_modules/chai/chai.js "$STATIC_ROOT/node_modules/chai/chai.js"
cp node_modules/chai-dom/chai-dom.js "$STATIC_ROOT/node_modules/chai-dom/chai-dom.js"
cp node_modules/sinon/pkg/sinon.js "$STATIC_ROOT/node_modules/sinon/pkg/sinon.js"
cp node_modules/mock-socket/dist/mock-socket.js "$STATIC_ROOT/node_modules/mock-socket/dist/mock-socket.js"

rm -rf "$STATIC_ROOT/test" "$STATIC_ROOT/src"
cp -r "./test" "$STATIC_ROOT/test"
cp -r "./src" "$STATIC_ROOT/src"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d1288d2

Please sign in to comment.