summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/www.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/www.sh')
-rwxr-xr-xscripts/www.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/www.sh b/scripts/www.sh
new file mode 100755
index 00000000..0601c181
--- /dev/null
+++ b/scripts/www.sh
@@ -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"