Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update Makefile to build the Maria website from the inline code docum…

…entation, examples, and doc directories.
  • Loading branch information...
commit 673d21491dda890d2d5011dd886979fa3170b89c 1 parent c00a9fb
@petermichaux authored
Showing with 58 additions and 57 deletions.
  1. +2 −2 .gitignore
  2. +42 −24 Makefile
  3. +7 −0 bin/build-example
  4. +7 −31 doc/index.html
View
4 .gitignore
@@ -1,4 +1,4 @@
build
tmp
-compiler.jar
-jsdoc
+lib/compiler
+lib/jsdoc
View
66 Makefile
@@ -1,4 +1,4 @@
-.PHONY: all clean cleaner
+.PHONY: all clean cleaner deploy-www
LIBS_MIN = lib/evento/evento-min.js \
lib/hijos/hijos-min.js \
@@ -31,39 +31,57 @@ SRCS = src/header.js \
src/SetView.subclass.js \
src/Controller.subclass.js
-all: build/maria.js build/maria-min.js build/doc
+all: build/dist/maria.js build/dist/maria-min.js build/www
-build/maria.js: $(LIBS) $(SRCS)
- mkdir -p build
- cat $(LIBS) $(SRCS) >build/maria.js
+build/dist/maria.js: $(LIBS) $(SRCS)
+ mkdir -p build/dist
+ cat $(LIBS) $(SRCS) >build/dist/maria.js
-build/maria-min.js: $(LIBS_MIN) $(SRCS) compiler.jar
- mkdir -p build tmp
+build/dist/maria-min.js: $(LIBS_MIN) $(SRCS) lib/compiler
+ mkdir -p build/dist tmp
cat $(SRCS) >tmp/maria-tmp1.js
- java -jar compiler.jar --js tmp/maria-tmp1.js --js_output_file tmp/maria-tmp2.js
- cat $(LIBS_MIN) src/header.js tmp/maria-tmp2.js >build/maria-min.js
+ java -jar lib/compiler/compiler.jar --js tmp/maria-tmp1.js --js_output_file tmp/maria-tmp2.js
+ cat $(LIBS_MIN) src/header.js tmp/maria-tmp2.js >build/dist/maria-min.js
-build/doc: build/maria.js jsdoc
- mkdir -p build
- rm -rf build/doc
- jsdoc/jsdoc build/maria.js --destination build/doc --configure etc/jsdoc-config.js
+deploy-www: build/www
+ scp -r build/www/* peter@peter.michaux.ca:~/sites/maria
-compiler.jar:
- mkdir -p tmp
- cd tmp && \
+build/www: build/www/eg build/www/api doc/* doc/*/* doc/*/*/* doc/*/*/* doc/*/*/*/* doc/*/*/*/*/*
+ mkdir -p build/www
+ touch build/www
+ cp -R doc/* build/www
+
+build/www/api: build/dist/maria.js lib/jsdoc
+ mkdir -p build/www
+ rm -rf build/www/api
+ lib/jsdoc/jsdoc build/dist/maria.js --destination build/www/api --configure etc/jsdoc-config.js
+
+build/www/eg: build/dist/maria.js eg/* eg/*/* eg/*/*/* eg/*/*/* eg/*/*/*/* eg/*/*/*/*/*
+ mkdir -p build/www
+ rm -rf build/www/eg
+ mkdir -p build/www/eg
+ bin/build-example checkit
+ bin/build-example scrollit
+ bin/build-example timeit
+
+lib/compiler:
+ mkdir -p tmp/compiler
+ cd tmp/compiler && \
curl -O http://closure-compiler.googlecode.com/files/compiler-latest.zip && \
- unzip compiler-latest.zip && \
- mv compiler.jar ..
+ unzip compiler-latest.zip
+ mkdir -p lib/compiler
+ mv tmp/compiler/compiler.jar lib/compiler
-jsdoc:
- mkdir -p tmp
- cd tmp && \
+lib/jsdoc:
+ mkdir -p tmp/jsdoc
+ cd tmp/jsdoc && \
curl curl -O https://nodeload.github.com/jsdoc3/jsdoc/tar.gz/v3.1.1 --output jsdoc-3.1.1.tar.gz && \
- tar xvzf jsdoc-3.1.1.tar.gz && \
- mv jsdoc-3.1.1 ../jsdoc
+ tar xvzf jsdoc-3.1.1.tar.gz
+ mkdir -p lib
+ mv tmp/jsdoc/jsdoc-3.1.1 lib/jsdoc
clean:
rm -rf build tmp
cleaner: clean
- rm -rf compiler.jar jsdoc
+ rm -rf lib/compiler lib/jsdoc
View
7 bin/build-example
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+# $1 is the name of the example in the eg directory
+
+cp -R "eg/"$1 "build/www/eg/"$1
+cp build/dist/maria.js build/www/eg/$1/lib/maria/
+cd build/www/eg && tar czf $1.tar.gz $1
View
38 doc/index.html
@@ -14,41 +14,17 @@
<ul>
<li><a href="quick-start-tutorial-for-the-impatient.html">Quick Start for the Impatient</a></li>
- <li>Introduction</li>
+ <li><a href="api/maria.html">API Documentation</a></li>
<li>
- Design Patterns
+ Examples
<ul>
- <li>Template</li>
- <li>Factory Method</li>
- <li>Observer</li>
- <li>Strategy</li>
- <li>Composite</li>
- </ul>
- </li>
- <li>
- The Maria Framework Classes
- <ul>
- <li><code>maria.Model</code></li>
- <li><code>maria.SetModel</code></li>
- <li><code>maria.View</code></li>
- <li><code>maria.ElementView</code></li>
- <li><code>maria.SetView</code></li>
- <li><code>maria.Controller</code></li>
- </ul>
- </li>
- <li>
- Building an Application
- <ul>
- <li>The TodoMVC Project</li>
- <li>...</li>
- </ul>
- </li>
- <li>
- Becoming an Expert
- <ul>
- <li>Reading the Source Code</li>
+ <li><code><a href="eg/checkit/src/index.html">checkit</a> (<a href="eg/checkit.tar.gz">download tarball</a>)</code></li>
+ <li><code><a href="eg/timeit/src/index.html">timeit</a> (<a href="eg/timeit.tar.gz">download tarball</a>)</code></li>
+ <li><code><a href="eg/scrollit/src/index.html">scrollit</a> (<a href="eg/scroll.tar.gz">download tarball</a>)</code></li>
+ <li><code><a href="http://todomvc.com/architecture-examples/maria/src/">TodoMVC</a></code></li>
</ul>
</li>
+ <li><a href="https://github.com/petermichaux/maria">GitHub Project</a></li>
</ul>
</div><!-- wrapper -->
Please sign in to comment.
Something went wrong with that request. Please try again.