Slowly bringing it up to standard. THIS CHECK-IN IS NOT COMPLETE.
This commit is contained in:
parent
1667a0e94d
commit
1f6c1e0b46
104
Makefile
104
Makefile
|
@ -1,58 +1,78 @@
|
|||
.SUFFIXES: .nw .js .pdf .html .tex
|
||||
.PHONY: setup store serve
|
||||
|
||||
NOTANGLE= notangle
|
||||
NOWEAVE= noweave
|
||||
ECHO= /bin/echo
|
||||
ECHO= echo
|
||||
|
||||
all: index.html store.js
|
||||
LIBS:= htdocs/lib/underscore.js htdocs/lib/jquery.js htdocs/lib/backbone.js
|
||||
|
||||
.nw.html:
|
||||
$(NOWEAVE) -filter l2h -delay -x -index -autodefs c -html $*.nw > $*.html
|
||||
all: htdocs/index.html htdocs/store.js htdocs/jsonstore.css htdocs/data/items.json
|
||||
@if [ ! -e "./htdocs/lib" ]; then \
|
||||
echo "Please do 'make setup' before continuing"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.nw.tex:
|
||||
$(NOWEAVE) -x -delay $*.nw > $*.tex #$
|
||||
serve: all
|
||||
$(COFFEE) ./bin/autoreload
|
||||
|
||||
.tex.pdf:
|
||||
xelatex $*.tex; \
|
||||
while grep -s 'Rerun to get cross-references right' $*.log; \
|
||||
store: all
|
||||
|
||||
htdocs/lib:
|
||||
mkdir -p htdocs/lib
|
||||
|
||||
htdocs/lib/underscore.js: htdocs/lib
|
||||
cp bower_components/underscore/underscore.js htdocs/lib
|
||||
|
||||
htdocs/lib/jquery.js: htdocs/lib
|
||||
cp bower_components/jquery/dist/jquery.js htdocs/lib
|
||||
|
||||
htdocs/lib/backbone.js:
|
||||
cp bower_components/backbone/backbone.js htdocs/lib
|
||||
|
||||
install:
|
||||
npm install
|
||||
./node_modules/bower/bin/bower install jquery underscore backbone
|
||||
|
||||
setup: install $(LIBS)
|
||||
|
||||
docs:
|
||||
mkdir -p docs
|
||||
|
||||
htdocs/index.html: src/backbonestore.nw
|
||||
$(NOTANGLE) -c -Rindex.haml src/backbonestore.nw > htdocs/index.html
|
||||
|
||||
htdocs/jsonstore.css: src/backbonestore.nw
|
||||
$(NOTANGLE) -c -Rjsonstore.css src/backbonestore.nw > htdocs/jsonstore.css
|
||||
|
||||
htdocs/store.js: src/backbonestore.nw
|
||||
$(NOTANGLE) -c -Rstore.js src/backbonestore.nw > htdocs/store.js
|
||||
|
||||
docs/backbonestore.tex: docs src/backbonestore.nw
|
||||
${NOWEAVE} -x -delay src/backbonestore.nw > docs/backbonestore.tex
|
||||
|
||||
docs/backbonestore.pdf: docs/backbonestore.tex
|
||||
xelatex docs/backbonestore.tex; \
|
||||
while grep -s 'Rerun to get cross-references right' ./backbonestore.log; \
|
||||
do \
|
||||
xelatex *$.tex; \
|
||||
xelatex docs/backbonestore.tex; \
|
||||
done
|
||||
mv backbonestore.pdf docs
|
||||
rm -f ./backbonestore.log ./backbonestore.aux ./backbonestore.out
|
||||
|
||||
.nw.js:
|
||||
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
||||
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-js-tmp
|
||||
@ if [ -s "$*.nw-js-tmp" ]; then \
|
||||
mv $*.nw-js-tmp $@; \
|
||||
else \
|
||||
echo "$@ not found in $<"; \
|
||||
rm $*.nw-js-tmp; \
|
||||
fi
|
||||
pdf: docs/backbonestore.pdf
|
||||
|
||||
store.js: backbonestore.nw
|
||||
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
||||
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-html-tmp
|
||||
@ if [ -s "$*.nw-html-tmp" ]; then \
|
||||
mv $*.nw-html-tmp $@; \
|
||||
else \
|
||||
echo "$@ not found in $<"; \
|
||||
rm $*.nw-tmp; \
|
||||
fi
|
||||
|
||||
index.html: backbonestore.nw
|
||||
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
||||
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-html-tmp
|
||||
@ if [ -s "$*.nw-html-tmp" ]; then \
|
||||
mv $*.nw-html-tmp $@; \
|
||||
else \
|
||||
echo "$@ not found in $<"; \
|
||||
rm $*.nw-tmp; \
|
||||
fi
|
||||
docs/backbonestore.html: docs src/backbonestore.nw
|
||||
$(NOWEAVE) -filter l2h -delay -x -autodefs c -html src/backbonestore.nw > docs/backbonestore.html
|
||||
|
||||
html: docs/backbonestore.html
|
||||
|
||||
clean:
|
||||
- rm -f *.tex *.dvi *.aux *.toc *.log *.out *.html *.js
|
||||
- rm -f htdocs/*.* docs/*.tex docs/*.dvi docs/*.aux docs/*.toc docs/*.log docs/*.out
|
||||
|
||||
distclean: clean
|
||||
- rm -fr ./htdocs/lib
|
||||
|
||||
realclean: distclean
|
||||
- rm -fr docs
|
||||
|
||||
realclean: clean
|
||||
- rm -f *.pdf
|
||||
|
||||
|
|
35
README
35
README
|
@ -1,35 +0,0 @@
|
|||
The Backbone Store is a simple demonstration application, a Backbone.js
|
||||
version of the Sammy.js tutorial.
|
||||
|
||||
## Installation
|
||||
|
||||
The Backbone store must be installed under a webserver in order to
|
||||
operate correctly. Chrome, especially, will not initialize the
|
||||
application from the filesystem. Just unpack it in a target directory
|
||||
of your choosing and then browse to that directory.
|
||||
|
||||
## Branches
|
||||
|
||||
There are two major development branches for The Backbone Store.
|
||||
|
||||
Branch 'master' uses HTML, CSS, and Javascript.
|
||||
|
||||
Branch 'modern' uses HAML, Stylus, and Coffee.
|
||||
|
||||
## Copyright
|
||||
|
||||
Store.js is entirely my own work, and is Copyright (c) 2010 Elf
|
||||
M. Sternberg. Included libraries are covered by their respective
|
||||
copyright holders, and are used with permission of the licenses
|
||||
included. Store.js is intended for educational purposes only, rather
|
||||
than to be working code, and is hereby licensed under the Creative
|
||||
Commons Attribution Non-Commercial Share Alike (by-nc-sa) licence.
|
||||
|
||||
The images contained herein are derivative works of photographs
|
||||
licensed under Creative Commons licences for non-commercial purposes.
|
||||
|
||||
## Contribution
|
||||
|
||||
Please look in backbonestore.nw for the base code. Backbonestore.nw
|
||||
is produced using the Noweb Literate Programming toolkit by Norman
|
||||
Ramsey (http://www.cs.tufts.edu/~nr/noweb/).
|
|
@ -0,0 +1,67 @@
|
|||
# About
|
||||
|
||||
The Backbone Store is a tutorial and demonstration application for the
|
||||
BackboneJS framework.
|
||||
|
||||
## Installation
|
||||
|
||||
After checking out the source code, type
|
||||
|
||||
$ make setup all serve
|
||||
|
||||
This will automatically run the NPM and Bower install scripts, placing
|
||||
the correct libraries into the target tree, build the actual application
|
||||
from the original source material, and start a server.
|
||||
|
||||
## Requirements
|
||||
|
||||
The build tool relies upon GNU Make, node-js, and the Ruby HAML
|
||||
application. It also uses the NoWeb Literate Programming documentation
|
||||
tools, and building the documentation from source requires Xelatex be
|
||||
installed as well.
|
||||
|
||||
The command 'make serve' probably only works under a fairly modern
|
||||
Linux, as it's dependent upon the kernel's inotify facility.
|
||||
|
||||
## Branches
|
||||
|
||||
There are two major development branches for The Backbone Store.
|
||||
|
||||
Branch 'master' uses HTML, CSS, and Javascript.
|
||||
|
||||
Branch 'modern' uses HAML, Stylus, and Coffee.
|
||||
|
||||
## Changelog
|
||||
|
||||
### Changes from 2.0
|
||||
|
||||
Version 3.0 has the following notable changes:
|
||||
* Replace __super__ with prototype
|
||||
* Replace Backbone-generated internal IDs with supplied IDs
|
||||
* Updates the use of Deferred
|
||||
* Updates to the current Underscore Template mechanism
|
||||
|
||||
### Changes from 1.0
|
||||
|
||||
Version 2.0 has the following notable changes:
|
||||
* Use of jQuery animations
|
||||
* Better Styling
|
||||
* Proper event management. Version 1.0 was just doin' it WRONG.
|
||||
|
||||
## Copyright
|
||||
|
||||
Store.js is entirely my own work, and is Copyright (c) 2010 Elf
|
||||
M. Sternberg. Included libraries are covered by their respective
|
||||
copyright holders, and are used with permission of the licenses
|
||||
included. Store.js is intended for educational purposes only, rather
|
||||
than to be working code, and is hereby licensed under the Creative
|
||||
Commons Attribution Non-Commercial Share Alike (by-nc-sa) licence.
|
||||
|
||||
The images contained herein are derivative works of photographs
|
||||
licensed under Creative Commons licences for non-commercial purposes.
|
||||
|
||||
## Contribution
|
||||
|
||||
Please look in backbonestore.nw for the base code. Backbonestore.nw
|
||||
is produced using the Noweb Literate Programming toolkit by Norman
|
||||
Ramsey (http://www.cs.tufts.edu/~nr/noweb/).
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue