From 56532f80ad670de1848049294879ff76aaae1076 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 2 Dec 2013 20:31:12 -0500 Subject: [PATCH] Rearrange files, splitting the library from the example(s). --- Makefile | 24 +++++++++++------- .../chat/app-resources}/Info.plist | 0 .../chat/app-resources}/app.icns | Bin .../chat/app-resources}/boot.sh | 2 +- index.html => examples/chat/index.html | 10 ++++---- index.js => examples/chat/index.js | 0 style.css => examples/chat/style.css | 0 server.rkt | 1 + .../bootstrap}/css/bootstrap-responsive.css | 0 .../css/bootstrap-responsive.min.css | 0 .../bootstrap}/css/bootstrap.css | 0 .../bootstrap}/css/bootstrap.min.css | 0 .../img/glyphicons-halflings-white.png | Bin .../bootstrap}/img/glyphicons-halflings.png | Bin .../bootstrap}/js/bootstrap.js | 0 .../bootstrap}/js/bootstrap.min.js | 0 .../jquery-2.0.3.min.js | 0 17 files changed, 22 insertions(+), 15 deletions(-) rename {app-resources => examples/chat/app-resources}/Info.plist (100%) rename {app-resources => examples/chat/app-resources}/app.icns (100%) rename {app-resources => examples/chat/app-resources}/boot.sh (60%) rename index.html => examples/chat/index.html (81%) rename index.js => examples/chat/index.js (100%) rename style.css => examples/chat/style.css (100%) rename {bootstrap => third-party/bootstrap}/css/bootstrap-responsive.css (100%) rename {bootstrap => third-party/bootstrap}/css/bootstrap-responsive.min.css (100%) rename {bootstrap => third-party/bootstrap}/css/bootstrap.css (100%) rename {bootstrap => third-party/bootstrap}/css/bootstrap.min.css (100%) rename {bootstrap => third-party/bootstrap}/img/glyphicons-halflings-white.png (100%) rename {bootstrap => third-party/bootstrap}/img/glyphicons-halflings.png (100%) rename {bootstrap => third-party/bootstrap}/js/bootstrap.js (100%) rename {bootstrap => third-party/bootstrap}/js/bootstrap.min.js (100%) rename jquery-2.0.3.min.js => third-party/jquery-2.0.3.min.js (100%) diff --git a/Makefile b/Makefile index 4df59f9..3cdf03d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ APP_NAME=MarketplaceChat.app -APP_SOURCES=index.html index.js marketplace.js style.css -RESOURCES=$(wildcard app-resources/*) +LIB_SOURCES=\ + marketplace.js +APP_SOURCES=\ + examples/chat/index.html \ + examples/chat/index.js \ + examples/chat/style.css +RESOURCES=$(wildcard examples/chat/app-resources/*) all: $(APP_NAME).zip @@ -22,17 +27,18 @@ clean-keys: $(APP_NAME).zip: $(APP_NAME) zip -r $@ $< -$(APP_NAME): $(APP_SOURCES) +$(APP_NAME): $(APP_SOURCES) $(LIB_SOURCES) echo RESOURCES $(RESOURCES) rm -rf $@ mkdir -p $@/Contents/MacOS mkdir -p $@/Contents/Resources - cp app-resources/Info.plist $@/Contents - cp app-resources/boot.sh $@/Contents/MacOS - cp app-resources/app.icns $@/Contents/Resources - cp -r bootstrap $@/Contents/Resources - cp jquery*js $@/Contents/Resources - cp $(APP_SOURCES) $@/Contents/Resources + cp examples/chat/app-resources/Info.plist $@/Contents + cp examples/chat/app-resources/boot.sh $@/Contents/MacOS + cp examples/chat/app-resources/app.icns $@/Contents/Resources + cp -r third-party $@/Contents/Resources + cp $(LIB_SOURCES) $@/Contents/Resources + mkdir -p $@/Contents/Resources/examples/chat + cp $(APP_SOURCES) $@/Contents/Resources/examples/chat chmod a+x $@/Contents/MacOS/boot.sh clean: diff --git a/app-resources/Info.plist b/examples/chat/app-resources/Info.plist similarity index 100% rename from app-resources/Info.plist rename to examples/chat/app-resources/Info.plist diff --git a/app-resources/app.icns b/examples/chat/app-resources/app.icns similarity index 100% rename from app-resources/app.icns rename to examples/chat/app-resources/app.icns diff --git a/app-resources/boot.sh b/examples/chat/app-resources/boot.sh similarity index 60% rename from app-resources/boot.sh rename to examples/chat/app-resources/boot.sh index 03e2f5a..1f69d48 100644 --- a/app-resources/boot.sh +++ b/examples/chat/app-resources/boot.sh @@ -1,3 +1,3 @@ #!/bin/bash cd "$(dirname "$0")"/../Resources -open index.html +open examples/chat/index.html diff --git a/index.html b/examples/chat/index.html similarity index 81% rename from index.html rename to examples/chat/index.html index 0560c0e..3e25d85 100644 --- a/index.html +++ b/examples/chat/index.html @@ -4,13 +4,13 @@ JS Marketplace - - + + - - + + - + diff --git a/index.js b/examples/chat/index.js similarity index 100% rename from index.js rename to examples/chat/index.js diff --git a/style.css b/examples/chat/style.css similarity index 100% rename from style.css rename to examples/chat/style.css diff --git a/server.rkt b/server.rkt index b6610d6..7a75eef 100644 --- a/server.rkt +++ b/server.rkt @@ -1,4 +1,5 @@ #lang minimart +;; Generic broker for WebSockets-based minimart/marketplace communication. (require net/rfc6455) (require minimart/drivers/timer) diff --git a/bootstrap/css/bootstrap-responsive.css b/third-party/bootstrap/css/bootstrap-responsive.css similarity index 100% rename from bootstrap/css/bootstrap-responsive.css rename to third-party/bootstrap/css/bootstrap-responsive.css diff --git a/bootstrap/css/bootstrap-responsive.min.css b/third-party/bootstrap/css/bootstrap-responsive.min.css similarity index 100% rename from bootstrap/css/bootstrap-responsive.min.css rename to third-party/bootstrap/css/bootstrap-responsive.min.css diff --git a/bootstrap/css/bootstrap.css b/third-party/bootstrap/css/bootstrap.css similarity index 100% rename from bootstrap/css/bootstrap.css rename to third-party/bootstrap/css/bootstrap.css diff --git a/bootstrap/css/bootstrap.min.css b/third-party/bootstrap/css/bootstrap.min.css similarity index 100% rename from bootstrap/css/bootstrap.min.css rename to third-party/bootstrap/css/bootstrap.min.css diff --git a/bootstrap/img/glyphicons-halflings-white.png b/third-party/bootstrap/img/glyphicons-halflings-white.png similarity index 100% rename from bootstrap/img/glyphicons-halflings-white.png rename to third-party/bootstrap/img/glyphicons-halflings-white.png diff --git a/bootstrap/img/glyphicons-halflings.png b/third-party/bootstrap/img/glyphicons-halflings.png similarity index 100% rename from bootstrap/img/glyphicons-halflings.png rename to third-party/bootstrap/img/glyphicons-halflings.png diff --git a/bootstrap/js/bootstrap.js b/third-party/bootstrap/js/bootstrap.js similarity index 100% rename from bootstrap/js/bootstrap.js rename to third-party/bootstrap/js/bootstrap.js diff --git a/bootstrap/js/bootstrap.min.js b/third-party/bootstrap/js/bootstrap.min.js similarity index 100% rename from bootstrap/js/bootstrap.min.js rename to third-party/bootstrap/js/bootstrap.min.js diff --git a/jquery-2.0.3.min.js b/third-party/jquery-2.0.3.min.js similarity index 100% rename from jquery-2.0.3.min.js rename to third-party/jquery-2.0.3.min.js