Skip to content

Commit

Permalink
Cache node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ericboehs committed Mar 27, 2019
1 parent 4b4929e commit f851a95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/language_pack/rails4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def default_assets_cache
"tmp/cache/assets"
end

def node_modules_cache
"node_modules"
end

def cleanup
super
return if assets_compile_enabled?
Expand All @@ -88,6 +92,7 @@ def run_assets_precompile_rake_task

@cache.load_without_overwrite public_assets_folder
@cache.load default_assets_cache
@cache.load node_modules_cache

precompile.invoke(env: rake_env)

Expand All @@ -101,6 +106,7 @@ def run_assets_precompile_rake_task
cleanup_assets_cache
@cache.store public_assets_folder
@cache.store default_assets_cache
@cache.store node_modules_cache
else
precompile_fail(precompile.output)
end
Expand Down

0 comments on commit f851a95

Please sign in to comment.