Skip to content

Commit

Permalink
Merge pull request #1 from dmose/test-rig
Browse files Browse the repository at this point in the history
Simple reference test rig for templates, including app-stub as built today
  • Loading branch information
jlongster committed Jul 12, 2012
2 parents 6b5964d + 0d7f50e commit 3757f6b
Show file tree
Hide file tree
Showing 120 changed files with 51,734 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ build/buildinfo.properties
build/config/buildinfo.properties

www-built
www-ghpages
www-ghpages

built

29 changes: 29 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# assumes execution from the top-level dir
TOP=.
BINDIR=${TOP}/bin

if [ -z "$1" ]; then
echo "Usage: $0 <template-name>"
exit
fi

tmplName="$1"

# force clean builds
rm -fr built
mkdir built

$BINDIR/build "$tmplName" $TOP/built/$tmplName >/dev/null

diff -uwr $TOP/ref/$tmplName $TOP/built/$tmplName
diffExit=$?

if [ "$diffExit" -eq 0 ]; then
echo "tests passed"
else
echo "tests failed!"
fi

exit $diffExit
13 changes: 13 additions & 0 deletions bin/test-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# assumes execution from the top-level dir
TOP=.
BINDIR=${TOP}/bin

for d in ${TOP}/templates/*
do
e=`basename $d`
[ $e = "default" ] && continue
${BINDIR}/test $e
done

3 changes: 3 additions & 0 deletions ref/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This directory contains reference builds of all the templates in the
templates directory for the test script to compare newly generated builds
against.
45 changes: 45 additions & 0 deletions ref/app-stub/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache

# OS or Editor folders
.DS_Store
._*
Thumbs.db
.cache
.project
.settings
.tmproj
nbproject
*.sublime-project
*.sublime-workspace

# Espresso
*.esproj
*.espressostorage

# Rubinius
*.rbc

# Folders to ignore
.hg
.svn
.CVS
intermediate
publish
.idea

# build script local files
build/buildinfo.properties
build/config/buildinfo.properties

www-built
www-ghpages
26 changes: 26 additions & 0 deletions ref/app-stub/README.textile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

h1. Mortar

"Mortar" is a code name for an Open Web App Bootstrap. This project aims to make it easy and quick to start writing Open Wep Apps.

It's a combination of HTML5 tricks (HTML/CSS), js libraries, and a little bit of management commands that make it really easy to write and deploy apps.

This should just be a template: you should download this and hack it up to be whatever you like. You can delete or add as much stuff as you want.

View the official site "here":http://jlongster.github.com/mortar.

h1. html5boilerplate

This is a fork from the "html5boilerplate":http://html5boilerplate.com/ project, and many of the HTML5 tricks come from there, so the appropriate authors deserve credit for those.

We don't need to target older browsers, however, so a bunch of IE 6/7 stuff has been removed and we've added things like marketplace libraries, "require.js":http://requirejs.org/, and "volo":https://github.com/volojs/volo. Any of those things can be simply ignored though.

h1. Back-end server

This is just a front-end template, but you'll most likely need to set up a server for your app. I highly recommend the "server-configs":https://github.com/h5bp/server-configs project from the h5b crew which provides really helpful templates for server configurations. That should help you get set up quickly.

Apache's @.htaccess@ file is already included here since that's the most popular.

h1. The End

This is very much alpha and will be fleshed out over time.
10 changes: 10 additions & 0 deletions ref/app-stub/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"amd": {
"baseUrl": "www/js/lib"
},
"volo": {
"dependencies": {
"jquery": "github:jquery/jquery/1.7.2"
}
}
}
Loading

0 comments on commit 3757f6b

Please sign in to comment.