diff --git a/coverit b/bin/coverit similarity index 73% rename from coverit rename to bin/coverit index 62749ea..92e92a1 100755 --- a/coverit +++ b/bin/coverit @@ -1,7 +1,7 @@ #!/usr/bin/env bash current_dir=$(cd $(dirname $0) && pwd) -base_dir=${current_dir} +base_dir=${current_dir}/.. cd ${base_dir} if [ ! -x ./opt/node-jscoverage/jscoverage ]; then @@ -18,5 +18,6 @@ if [ ! -x ./node_modules/.bin/mocha ]; then fi ./opt/node-jscoverage/jscoverage lib lib-cov -PROTOTYPER_COV=1 ./node_modules/.bin/mocha -R html-cov > public/coverage.html +PROTOTYPER_COV=1 ./node_modules/.bin/mocha -R html-cov > ./doc/coverage.html rm -rf lib-cov +echo "coverage.html generated in doc/coverage.html" diff --git a/deployit b/bin/deployit similarity index 97% rename from deployit rename to bin/deployit index f4b94e0..83fefa1 100755 --- a/deployit +++ b/bin/deployit @@ -1,7 +1,7 @@ #!/usr/bin/env bash current_dir=$(cd $(dirname $0) && pwd) -base_dir=${current_dir} +base_dir=${current_dir}/.. cd ${base_dir} command -v fleet diff --git a/docit b/bin/docit similarity index 91% rename from docit rename to bin/docit index fee19c5..3dcb2e1 100755 --- a/docit +++ b/bin/docit @@ -1,7 +1,7 @@ #!/usr/bin/env bash current_dir=$(cd $(dirname $0) && pwd) -base_dir=${current_dir} +base_dir=${current_dir}/.. cd ${base_dir} diff --git a/installit b/bin/installit similarity index 96% rename from installit rename to bin/installit index f9fac8b..e35ce83 100755 --- a/installit +++ b/bin/installit @@ -5,7 +5,7 @@ set -e current_dir=$(cd $(dirname $0) && pwd) -base_dir=${current_dir} +base_dir=${current_dir}/.. cd ${base_dir} @@ -81,7 +81,7 @@ if [ ! -f ./knockout-sortable.min.js ]; then ${CURL} https://raw.github.com/rniemeyer/knockout-sortable/master/build/knockout-sortable.min.js fi -cd ${current_dir} +cd ${base_dir} # Bootstrap mkdir -p ./public/lib/bootstrap @@ -92,7 +92,7 @@ fi if [ ! -f ./bootstrap.min.js ]; then ${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js fi -cd ${current_dir} +cd ${base_dir} # http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/img/glyphicons-halflings.png mkdir -p ./public/lib/img @@ -103,7 +103,7 @@ fi if [ ! -f ./glyphicons-halflings-white.png ]; then ${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/img/glyphicons-halflings-white.png fi -cd ${current_dir} +cd ${base_dir} # JQuery mkdir -p ./public/lib/jquery @@ -111,7 +111,7 @@ cd ./public/lib/jquery if [ ! -f ./jquery.min.js ]; then ${CURL} http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js fi -cd ${current_dir} +cd ${base_dir} # SockJS mkdir -p ./public/lib/sockjs @@ -119,7 +119,7 @@ cd ./public/lib/sockjs if [ ! -f ./sockjs-0.3.min.js ]; then ${CURL} http://cdn.sockjs.org/sockjs-0.3.min.js fi -cd ${current_dir} +cd ${base_dir} # Underscore mkdir -p ./public/lib/underscore @@ -127,7 +127,7 @@ cd ./public/lib/underscore if [ ! -f ./underscore-min.js ]; then ${CURL} http://underscorejs.org/underscore-min.js fi -cd ${current_dir} +cd ${base_dir} # //cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js mkdir -p ./public/lib/modernizr @@ -135,7 +135,7 @@ cd ./public/lib/modernizr if [ ! -f ./modernizr.min.js ]; then ${CURL} http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js fi -cd ${current_dir} +cd ${base_dir} # //netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css mkdir -p ./public/lib/font-awesome @@ -143,7 +143,7 @@ cd ./public/lib/font-awesome if [ ! -f ./font-awesome.css ]; then ${CURL} http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css fi -cd ${current_dir} +cd ${base_dir} # https://raw.github.com/cloudhead/less.js/master/dist/less-1.3.3.min.js mkdir -p ./public/lib/lessjs @@ -151,7 +151,7 @@ cd ./public/lib/lessjs if [ ! -f ./less-1.3.3.min.js ]; then ${CURL} https://raw.github.com/cloudhead/less.js/master/dist/less-1.3.3.min.js fi -cd ${current_dir} +cd ${base_dir} if [ ! -d ${HOME}/.prototyper-cache ];then mkdir -p ${HOME}/.prototyper-cache diff --git a/package.json b/package.json index 454e6d6..55383e5 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,9 @@ "description": "README.md", "scripts": { "test": "./node_modules/.bin/mocha", - "install": "./installit", - "deploy": "./deployit", - "doc":"./docit", - "cov": "./coverit" + "install": "./bin/installit", + "deploy": "./bin/deployit", + "doc":"./bin/docit", + "cov": "./bin/coverit" } } diff --git a/server.js b/server.js index 992d1ff..a230416 100644 --- a/server.js +++ b/server.js @@ -57,6 +57,7 @@ var config = { dev_favicon_path: __dirname + '/public/favicon_dev.ico', importer_path: __dirname + '/public', public_path: __dirname + '/public', + doc_path: __dirname + '/doc', markdown_client: __dirname + '/node_modules/markdown/lib', ace_client: __dirname + '/node_modules/share/examples/lib/ace', async_client: __dirname + '/node_modules/async/lib' @@ -77,6 +78,8 @@ if (!process.env.NODE_ENV) { //noinspection JSUnresolvedFunction app.use(express.static(config.statics.public_path)); //noinspection JSUnresolvedFunction +app.use('/doc',express.static(config.statics.doc_path)); +//noinspection JSUnresolvedFunction app.use('/lib/markdown', express.static(config.statics.markdown_client)); //noinspection JSUnresolvedFunction app.use('/lib/ace', express.static(config.statics.ace_client));