Initial check-in.

This commit is contained in:
Ken Elf Mathieu Sternberg 2013-03-05 15:25:53 -08:00
commit 04de588943
5 changed files with 93 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*#
.#*
*~
npm-debug.log
.grunt.js
node_modules/*
build/
public/

35
Makefile Normal file
View File

@ -0,0 +1,35 @@
.PHONY: app libs
app_sources:= $(wildcard src/*/*.coffee)
app_objects:= $(subst src/, app/, $(app_sources:%.coffee=%.js))
libs= $(shell cd src && find . -type f -name '*.js')
home_sources = src/index.haml
home_objects = app/index.html
default: build
build: app bootstrap $(app_objects) $(home_objects) libs
app:
mkdir -p $@
$(app_objects): app/%.js: src/%.coffee
coffee -o $(@D) -c $<
libs:
cd src && tar cf - $(libs) | ( cd ../app; tar xvf - )
$(home_objects): app/%.html: src/%.haml
haml --unix-newlines --no-escape-attrs --double-quote-attributes $< > $@
bootstrap: app
cp bootstrap-extras/variables.less vendor/bootstrap/less
cd vendor/bootstrap && make build
cd vendor/bootstrap/bootstrap && tar cf - .| (cd ../../../app && tar xvf - )
clean:
rm -fr app
cd vendor/bootstrap && git reset --hard HEAD

12
bin/activate Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# /bin comes before /node_modules/.bin because sometimes I want to
# override the behaviors provided.
PROJECT_ROOT=`pwd`
PATH="$PROJECT_ROOT/bin:$PROJECT_ROOT/node_modules/.bin:$PATH"
export PATH
PS1="(`basename \"$PROJECT_ROOT\"`)$PS1"
export PS1

12
bin/gruntc Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
PROJECTPATH=$(dirname ${BASH_SOURCE})/..
PROJECTPATH="`cd ${PROJECTPATH}; pwd`"
SRC="$PROJECTPATH/grunt.coffee"
DST="$PROJECTPATH/.grunt.js"
if [ ! -f "$DST" -o "$SRC" -nt "$DST" ]; then
echo "Rebuilding $DST..."
coffee -cp $SRC > $DST
fi
grunt --config $DST $*

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "Tumble",
"description": "An implementation of a parser for Tumbler."
"author": {
"name": "Elf M. Sternberg"
},
"version": "0.0.1",
"keywords": ["parser", "coffeescript"],
"licenses": [{
"type": "ARR",
"url": "http://elfsternberg.com/home/elfsternberg/repos/Tumble/LICENSE"
}],
"dependencies": {
"coffee-script": "1.x.x"
},
"devDependencies": {
"docco": "0.3.x"
},
"directories": {
"lib": "./lib"
},
"main": "./lib/tumble",
"engines": {
"node": ">= 0.6.0"
}
}