From 40ceb747aefde716fb9b9bc3f15bb39d36de97e0 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 7 Oct 2016 10:06:25 -0400 Subject: [PATCH] refactor structure --- build-js.sh | 21 +++++++------------ contrib/js/contrib/readme.md | 1 + contrib/js/{main.js_ => entry.js} | 0 contrib/js/{ => nntpchan}/api.js | 0 contrib/js/{ => nntpchan}/banner.js | 0 contrib/js/{ => nntpchan}/captcha-reload.js | 0 contrib/js/{ => nntpchan}/expand-image.js | 0 contrib/js/{ => nntpchan}/expand-video.js | 0 contrib/js/{ => nntpchan}/hide-post.js | 0 contrib/js/{ => nntpchan}/livechan.js | 0 contrib/js/{ => nntpchan}/local_storage.js | 0 contrib/js/{ => nntpchan}/old-livechan.js | 0 contrib/js/nntpchan/readme.md | 1 + contrib/js/{ => nntpchan}/reply.js | 0 contrib/js/{ => nntpchan}/theme.js | 0 .../js/{ => nntpchan/unused}/cuckoo_miner.js | 0 contrib/js/nntpchan/unused/readme.md | 2 ++ contrib/js/readme.md | 2 ++ 18 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 contrib/js/contrib/readme.md rename contrib/js/{main.js_ => entry.js} (100%) rename contrib/js/{ => nntpchan}/api.js (100%) rename contrib/js/{ => nntpchan}/banner.js (100%) rename contrib/js/{ => nntpchan}/captcha-reload.js (100%) rename contrib/js/{ => nntpchan}/expand-image.js (100%) rename contrib/js/{ => nntpchan}/expand-video.js (100%) rename contrib/js/{ => nntpchan}/hide-post.js (100%) rename contrib/js/{ => nntpchan}/livechan.js (100%) rename contrib/js/{ => nntpchan}/local_storage.js (100%) rename contrib/js/{ => nntpchan}/old-livechan.js (100%) create mode 100644 contrib/js/nntpchan/readme.md rename contrib/js/{ => nntpchan}/reply.js (100%) rename contrib/js/{ => nntpchan}/theme.js (100%) rename contrib/js/{ => nntpchan/unused}/cuckoo_miner.js (100%) create mode 100644 contrib/js/nntpchan/unused/readme.md create mode 100644 contrib/js/readme.md diff --git a/build-js.sh b/build-js.sh index c5fccb6..1828828 100755 --- a/build-js.sh +++ b/build-js.sh @@ -15,17 +15,6 @@ if [ ! -f $GOPATH/bin/minify ]; then echo "set up minifiy" go get -v github.com/tdewolff/minify/cmd/minify fi -if [ ! -f $GOPATH/bin/gopherjs ]; then - echo "set up gopherjs" - go get -v -u github.com/gopherjs/gopherjs -fi - -# build cuckoo miner -#echo "Building cuckoo miner" -#go get -v -u github.com/ZiRo-/cuckgo/miner_js -#$GOPATH/bin/gopherjs -m -v build github.com/ZiRo-/cuckgo/miner_js -#mv ./miner_js.js ./contrib/static/miner-js.js -#rm ./miner_js.js.map outfile=$PWD/contrib/static/nntpchan.js @@ -62,10 +51,16 @@ if [ -e ./contrib/js/contrib/*.js ] ; then done fi -mini ./contrib/js/main.js_ $outfile +mini ./contrib/js/entry.js $outfile # local js -for f in ./contrib/js/*.js ; do +for f in ./contrib/js/nntpchan/*.js ; do mini $f $outfile done + +# vendor js +for f in ./contrib/js/vendor/*.js ; do + mini $f $outfile +done + echo "ok" diff --git a/contrib/js/contrib/readme.md b/contrib/js/contrib/readme.md new file mode 100644 index 0000000..a0ea923 --- /dev/null +++ b/contrib/js/contrib/readme.md @@ -0,0 +1 @@ +3rd party javascript diff --git a/contrib/js/main.js_ b/contrib/js/entry.js similarity index 100% rename from contrib/js/main.js_ rename to contrib/js/entry.js diff --git a/contrib/js/api.js b/contrib/js/nntpchan/api.js similarity index 100% rename from contrib/js/api.js rename to contrib/js/nntpchan/api.js diff --git a/contrib/js/banner.js b/contrib/js/nntpchan/banner.js similarity index 100% rename from contrib/js/banner.js rename to contrib/js/nntpchan/banner.js diff --git a/contrib/js/captcha-reload.js b/contrib/js/nntpchan/captcha-reload.js similarity index 100% rename from contrib/js/captcha-reload.js rename to contrib/js/nntpchan/captcha-reload.js diff --git a/contrib/js/expand-image.js b/contrib/js/nntpchan/expand-image.js similarity index 100% rename from contrib/js/expand-image.js rename to contrib/js/nntpchan/expand-image.js diff --git a/contrib/js/expand-video.js b/contrib/js/nntpchan/expand-video.js similarity index 100% rename from contrib/js/expand-video.js rename to contrib/js/nntpchan/expand-video.js diff --git a/contrib/js/hide-post.js b/contrib/js/nntpchan/hide-post.js similarity index 100% rename from contrib/js/hide-post.js rename to contrib/js/nntpchan/hide-post.js diff --git a/contrib/js/livechan.js b/contrib/js/nntpchan/livechan.js similarity index 100% rename from contrib/js/livechan.js rename to contrib/js/nntpchan/livechan.js diff --git a/contrib/js/local_storage.js b/contrib/js/nntpchan/local_storage.js similarity index 100% rename from contrib/js/local_storage.js rename to contrib/js/nntpchan/local_storage.js diff --git a/contrib/js/old-livechan.js b/contrib/js/nntpchan/old-livechan.js similarity index 100% rename from contrib/js/old-livechan.js rename to contrib/js/nntpchan/old-livechan.js diff --git a/contrib/js/nntpchan/readme.md b/contrib/js/nntpchan/readme.md new file mode 100644 index 0000000..b08a229 --- /dev/null +++ b/contrib/js/nntpchan/readme.md @@ -0,0 +1 @@ +main nntpchan javascript files diff --git a/contrib/js/reply.js b/contrib/js/nntpchan/reply.js similarity index 100% rename from contrib/js/reply.js rename to contrib/js/nntpchan/reply.js diff --git a/contrib/js/theme.js b/contrib/js/nntpchan/theme.js similarity index 100% rename from contrib/js/theme.js rename to contrib/js/nntpchan/theme.js diff --git a/contrib/js/cuckoo_miner.js b/contrib/js/nntpchan/unused/cuckoo_miner.js similarity index 100% rename from contrib/js/cuckoo_miner.js rename to contrib/js/nntpchan/unused/cuckoo_miner.js diff --git a/contrib/js/nntpchan/unused/readme.md b/contrib/js/nntpchan/unused/readme.md new file mode 100644 index 0000000..2a6e625 --- /dev/null +++ b/contrib/js/nntpchan/unused/readme.md @@ -0,0 +1,2 @@ +this directory holds unused javascript files for nntpchan +don't delete files move them here diff --git a/contrib/js/readme.md b/contrib/js/readme.md new file mode 100644 index 0000000..406e4ab --- /dev/null +++ b/contrib/js/readme.md @@ -0,0 +1,2 @@ +javascript files for nntpchan +