Method: Jets::Builders::CodeBuilder#move_node_modules
- Defined in:
- lib/jets/builders/code_builder.rb
#move_node_modules(source_folder, dest_folder) ⇒ Object
Move the node modules to the tmp build folder to speed up project copying. A little bit risky because a ctrl-c in the middle of the project copying results in a missing node_modules but user can easily rebuild that.
Tesing shows 6.623413 vs 0.027754 speed improvement.
308 309 310 311 312 313 314 |
# File 'lib/jets/builders/code_builder.rb', line 308 def move_node_modules(source_folder, dest_folder) source = "#{source_folder}/node_modules" dest = "#{dest_folder}/node_modules" if File.exist?(source) FileUtils.mv(source, dest) end end |