mirror of
/repos/Prototyper.git
synced 2025-12-30 06:31:32 +01:00
added lib caching, deployit script
This commit is contained in:
parent
a730a553fe
commit
b81177b4a2
3
deployit
Normal file → Executable file
3
deployit
Normal file → Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
fleet-deploy && fleet-exec -- npm --cache-min=99999 install && fleet-exec npm rebuild bson && fleet-spawn npm start
|
||||
12
installit
12
installit
@ -20,7 +20,6 @@ set +e
|
||||
head ./node_modules/bson/ext/bson.h | grep "#define USE_MISALIGNED_MEMORY_ACCESS 1"
|
||||
rebuild_bson=$?
|
||||
set -e
|
||||
echo rebuild_bson $rebuild_bson
|
||||
arch=`uname -m`
|
||||
if [[ "${arch}" == 'armv6l' && "${rebuild_bson}" == 0 ]]; then
|
||||
# ARM support: https://github.com/mongodb/js-bson/issues/37
|
||||
@ -39,6 +38,12 @@ if [ ! -f ./node_modules/share/webclient/share.js_orig ]; then
|
||||
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share-ace.js
|
||||
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share.uncompressed.js
|
||||
fi
|
||||
|
||||
if [[ -d ${HOME}/.prototyper-cache/lib && ! -d ./public/lib ]];then
|
||||
mkdir -p ./public/lib
|
||||
cp -r ${HOME}/.prototyper-cache/lib ./public
|
||||
fi
|
||||
|
||||
# Knockout
|
||||
mkdir -p ./public/lib/knockout
|
||||
cd ./public/lib/knockout
|
||||
@ -138,6 +143,11 @@ if [ ! -f ./less-1.3.3.min.js ]; then
|
||||
fi
|
||||
cd ${current_dir}
|
||||
|
||||
if [ ! -d ${HOME}/.prototyper-cache/lib ];then
|
||||
mkdir -p ${HOME}/.prototyper-cache
|
||||
cp -r ./public/lib ${HOME}/.prototyper-cache
|
||||
fi
|
||||
|
||||
if [[ "${arch}" == 'armv6l' && ! -d ./node_modules/bson/build ]]; then
|
||||
echo "need to rebuild bson: 'npm rebuild bson' before running"
|
||||
fi
|
||||
|
||||
68
package.json
68
package.json
@ -1,35 +1,37 @@
|
||||
{
|
||||
"name": "Prototyper",
|
||||
"version": "0.0.1",
|
||||
"main": "server.js",
|
||||
"engine": "node 0.10.4",
|
||||
"private": "true",
|
||||
"dependencies": {
|
||||
"share": "~0.6.0",
|
||||
"connect": "~2.7.6",
|
||||
"express": "~3.2.0",
|
||||
"bson": "~0.1.8",
|
||||
"mongodb": "~1.2.14",
|
||||
"handlebars": "~1.0.10",
|
||||
"underscore": "~1.4.4",
|
||||
"less": "~1.3.3",
|
||||
"when": "~2.0.1",
|
||||
"markdown": "~0.4.0",
|
||||
"async": "~0.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sockjs": "~0.3.5"
|
||||
},
|
||||
"repository": "git://github.com/aikomastboom/Prototyper.git",
|
||||
"author": "Aiko Mastboom",
|
||||
"license": "Unknown",
|
||||
"readmeFilename": "README.md",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"description": "README.md",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"install": "./installit"
|
||||
}
|
||||
"name": "Prototyper",
|
||||
"version": "0.0.1",
|
||||
"main": "server.js",
|
||||
"engine": "node 0.10.4",
|
||||
"private": "true",
|
||||
"dependencies": {
|
||||
"share": "~0.6.0",
|
||||
"connect": "~2.7.6",
|
||||
"express": "~3.2.0",
|
||||
"bson": "~0.1.8",
|
||||
"mongodb": "~1.2.14",
|
||||
"handlebars": "~1.0.10",
|
||||
"underscore": "~1.4.4",
|
||||
"less": "~1.3.3",
|
||||
"when": "~2.0.1",
|
||||
"markdown": "~0.4.0",
|
||||
"async": "~0.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sockjs": "~0.3.5"
|
||||
},
|
||||
"repository": "git://github.com/aikomastboom/Prototyper.git",
|
||||
"author": "Aiko Mastboom",
|
||||
"license": "Unknown",
|
||||
"readmeFilename": "README.md",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"description": "README.md",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"install": "./installit",
|
||||
"deploy": "./deployit"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user