mirror of
/repos/Prototyper.git
synced 2025-12-30 06:31:32 +01:00
added groc and coverage
This commit is contained in:
parent
1d2116e43e
commit
3f7c13571b
22
coverit
Executable file
22
coverit
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
current_dir=$(cd $(dirname $0) && pwd)
|
||||
base_dir=${current_dir}
|
||||
cd ${base_dir}
|
||||
|
||||
if [ ! -x ./opt/node-jscoverage/jscoverage ]; then
|
||||
mkdir -p ./opt
|
||||
cd ./opt
|
||||
git clone git://github.com/visionmedia/node-jscoverage.git
|
||||
cd node-jscoverage/
|
||||
./configure && make
|
||||
cd ${base_dir}
|
||||
fi
|
||||
|
||||
if [ ! -x ./node_modules/.bin/mocha ]; then
|
||||
npm install mocha
|
||||
fi
|
||||
|
||||
./opt/node-jscoverage/jscoverage lib lib-cov
|
||||
PROTOTYPER_COV=1 ./node_modules/.bin/mocha -R html-cov > public/coverage.html
|
||||
rm -rf lib-cov
|
||||
4
deployit
4
deployit
@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
current_dir=$(cd $(dirname $0) && pwd)
|
||||
base_dir=${current_dir}
|
||||
cd ${base_dir}
|
||||
|
||||
command -v fleet
|
||||
fleet_installed=$?
|
||||
if [ ${fleet_installed} == 1 ]; then
|
||||
|
||||
18
docit
Executable file
18
docit
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
current_dir=$(cd $(dirname $0) && pwd)
|
||||
base_dir=${current_dir}
|
||||
cd ${base_dir}
|
||||
|
||||
|
||||
command -v pygmentize
|
||||
pygments_installed=$?
|
||||
if [ ${pygments_installed} == 1 ]; then
|
||||
easy_install pygments
|
||||
fi
|
||||
|
||||
if [ ! -x ./node_modules/.bin/groc ]; then
|
||||
npm install groc
|
||||
fi
|
||||
|
||||
./node_modules/.bin/groc lib/*.js
|
||||
@ -5,7 +5,9 @@
|
||||
set -e
|
||||
|
||||
current_dir=$(cd $(dirname $0) && pwd)
|
||||
cd ${current_dir}
|
||||
base_dir=${current_dir}
|
||||
cd ${base_dir}
|
||||
|
||||
|
||||
unameStr=`uname`
|
||||
if [[ "${unameStr}" == 'Linux' ]]; then
|
||||
|
||||
@ -25,7 +25,8 @@
|
||||
"sockjs": "~0.3.7",
|
||||
"chai": "*",
|
||||
"mocha": "*",
|
||||
"sinon": "*"
|
||||
"sinon": "*",
|
||||
"groc": "*"
|
||||
},
|
||||
"repository": "git://github.com/aikomastboom/Prototyper.git",
|
||||
"author": "Aiko Mastboom",
|
||||
@ -36,8 +37,10 @@
|
||||
},
|
||||
"description": "README.md",
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"test": "./node_modules/.bin/mocha",
|
||||
"install": "./installit",
|
||||
"deploy": "./deployit"
|
||||
"deploy": "./deployit",
|
||||
"doc":"./docit",
|
||||
"cov": "./coverit"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
var helpers = require('../lib/helpers.js');
|
||||
var libpath = process.env['PROTOTYPER_COV'] ? '../lib-cov' : '../lib';
|
||||
|
||||
var helpers = require(libpath + '/helpers.js');
|
||||
var expect = require('chai').expect;
|
||||
var when = require('when');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user