-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
index.js
and test scaffolding, tidy README
.
- Loading branch information
1 parent
e509ec0
commit 9337d9f
Showing
7 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "xy", | ||
"version": "0.0.0", | ||
"author": "Alan Gutierrez <alan@prettyrobots.com>", | ||
"description": "An R-Tree partition algorithm.", | ||
"keywords": | ||
[ | ||
"hilbert", "hilbert curve", "cruve", "spaital", "r-tree" | ||
], | ||
"url": "http://bigeasy.github.com/xy", | ||
"homepage": "https://github.com/bigeasy/xy", | ||
"bugs": "https://github.com/bigeasy/xy/issues", | ||
"repository": | ||
{ | ||
"type": "git", | ||
"url": "http://github.com/bigeasy/xy.git" | ||
}, | ||
"contributors": | ||
[{ | ||
"name": "Demarius Chrite", | ||
"email": "chrite.demarius@gmail.com", | ||
"web": "https://github.com/demarius" | ||
}], | ||
"devDependencies": | ||
{ | ||
"proof": "0.0.35" | ||
}, | ||
"licenses": | ||
[{ | ||
"type": "MIT", | ||
"url": "http://github.com/bigeasy/xy/raw/master/LICENSE" | ||
}], | ||
"scripts": | ||
{ | ||
"test": "proof platform win32 && proof test */*/*.t.js || t/test" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
rm -rf coverage | ||
|
||
count=1; | ||
for file in $(find t -name \*.t.js); do | ||
node_modules/.bin/istanbul cover -x 't/**' $file > /dev/null 2>&1 | ||
mv coverage/coverage.json coverage/coverage$count.json | ||
count=$(expr $count + 1) | ||
done | ||
|
||
node_modules/.bin/istanbul report --root coverage --dir coverage > /dev/null | ||
|
||
sed -i -e s,'^SF:'`pwd`/,SF:, coverage/lcov.info | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
dir=`cd ${0%/*} && pwd` | ||
UGLIFY_JS="${dir%/t}/node_modules/.bin/uglifyjs" | ||
|
||
printf "%-24s %11s %11s %11s %11s\n" File Raw Min Zip Min/Zip | ||
for file in $@; do | ||
b_0=`cat $file | wc -c` | ||
b_1=`cat $file | $UGLIFY_JS | wc -c` | ||
alt=`cat $file | $UGLIFY_JS --lift-vars | wc -c` | ||
if [ $alt -lt ${b_1} ]; then | ||
b_1=$alt | ||
fi | ||
b_2=`cat $file | gzip -c | wc -c` | ||
b_3=`cat $file | $UGLIFY_JS | gzip -c | wc -c` | ||
alt=`cat $file | $UGLIFY_JS --lift-vars | gzip -c | wc -c` | ||
if [ $alt -lt ${b_3} ]; then | ||
b_3=$alt | ||
fi | ||
for field in 0 1 2 3; do | ||
eval val=\$b_$field | ||
val=`echo $val / 1024 | bc -l` | ||
eval k_$field=$val | ||
done | ||
printf "%-24s" $file | ||
for field in 0 1 2 3; do | ||
eval printf "%6d/%05.2f" \$b_$field \$k_$field | ||
done | ||
printf "\n" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
echo "" | ||
|
||
(proof run t/*/*.t.js | tee .proof.out | proof progress) || (proof errors < .proof.out) || exit 1 | ||
|
||
if [ "$TRAVIS" = "true" ]; then | ||
echo "running with coverage" | ||
t/cover | ||
|
||
echo "submitting to coveralls.io" | ||
(cat coverage/lcov.info | node_modules/.bin/coveralls) > /dev/null 2>&1 | ||
|
||
curl 'https://www.prettyrobots.com/travisty' | sh | ||
fi | ||
|
||
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require('proof')(1, function (ok) { | ||
ok(require('../..'), 'require') | ||
}) |