Commit ef57f219 authored by zeke's avatar zeke

bring caching back

parent b8a6635f
...@@ -62,31 +62,30 @@ cache_store_dir="$cache_dir/node_modules/$node_version" ...@@ -62,31 +62,30 @@ cache_store_dir="$cache_dir/node_modules/$node_version"
cache_target_dir="$build_dir/node_modules" cache_target_dir="$build_dir/node_modules"
# Restore node_modules from cache, if present # Restore node_modules from cache, if present
# if [ -d $cache_store_dir ]; then if [ -d $cache_store_dir ]; then
# status "Restoring node_modules cache" status "Restoring node_modules cache"
# if [ -d $cache_target_dir ]; then if [ -d $cache_target_dir ]; then
# cp -r $cache_store_dir/* $cache_target_dir/ cp -r $cache_store_dir/* $cache_target_dir/
# else else
# cp -r $cache_store_dir $cache_target_dir cp -r $cache_store_dir $cache_target_dir
# fi fi
# status "Pruning any unused dependencies" status "Pruning any unused dependencies"
# npm prune npm prune
# fi fi
cd $build_dir
# Install dependencies # Install dependencies
status "Installing dependencies" status "Installing dependencies"
cd $build_dir
npm install --production npm install --production
npm rebuild npm rebuild
# Cache node_modules for future builds # Cache node_modules for future builds
# if [ -d $cache_target_dir ]; then if [ -d $cache_target_dir ]; then
# status "Caching node_modules for future builds" status "Caching node_modules for future builds"
# rm -rf $cache_store_dir rm -rf $cache_store_dir
# mkdir -p $(dirname $cache_store_dir) mkdir -p $(dirname $cache_store_dir)
# cp -r $cache_target_dir $cache_store_dir cp -r $cache_target_dir $cache_store_dir
# fi fi
# Update the PATH # Update the PATH
status "Building runtime environment" status "Building runtime environment"
......
...@@ -51,11 +51,11 @@ testProfileCreated() { ...@@ -51,11 +51,11 @@ testProfileCreated() {
assertCapturedSuccess assertCapturedSuccess
} }
# testNodeModulesCached() { testNodeModulesCached() {
# cache=$(mktmpdir) cache=$(mktmpdir)
# compile "node-modules-caching" $cache compile "node-modules-caching" $cache
# assertEquals "1" "$(ls -1 $cache/node_modules/0.10.17 | wc -l)" assertEquals "1" "$(ls -1 $cache/node_modules/0.10.18 | wc -l)"
# } }
## utils ######################################## ## utils ########################################
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
"url" : "http://github.com/example/example.git" "url" : "http://github.com/example/example.git"
}, },
"engines": { "engines": {
"node": "0.10.15", "node": "0.10.18"
"npm": "1.3.5"
}, },
"dependencies": { "dependencies": {
"express": "latest" "express": "latest"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment