lib/learn_open/opener.rb in learn-open-1.1.57 vs lib/learn_open/opener.rb in learn-open-1.1.58

- old
+ new

@@ -29,10 +29,11 @@ open_readme else fork_repo clone_repo bundle_install + npm_install open_with_editor cd_to_lesson end end @@ -294,9 +295,16 @@ def bundle_install if !ios_lesson? && File.exists?("#{lessons_dir}/#{repo_dir}/Gemfile") puts "Bundling..." system("cd #{lessons_dir}/#{repo_dir} && bundle install &>/dev/null") + end + end + + def npm_install + if !ios_lesson? && File.exists?("#{lessons_dir}/#{repo_dir}/package.json") + puts "Running npm install..." + system("cd #{lessons_dir}/#{repo_dir} && npm install &>/dev/null") end end def lesson_is_readme? !lesson_is_lab