Skip to content

Commit

Permalink
Do not fail trying to append_to_file which does not exist (#269)
Browse files Browse the repository at this point in the history
* Do not fail trying to append_to_file which does not exist

* Fix alignment
  • Loading branch information
Nikita Fedyashev authored and gauravtiwari committed Apr 19, 2017
1 parent 814caba commit 3ff0517
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/install/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
directory "#{__dir__}/config/loaders/core", "config/webpack/loaders"
copy_file "#{__dir__}/config/.postcssrc.yml", ".postcssrc.yml"

append_to_file ".gitignore", <<-EOS
/public/packs
/node_modules
EOS
if File.exists?(".gitignore")
append_to_file ".gitignore", <<-EOS
/public/packs
/node_modules
EOS
end

puts "Installing all JavaScript dependencies"
run "./bin/yarn add webpack webpack-merge js-yaml path-complete-extname " \
Expand Down

0 comments on commit 3ff0517

Please sign in to comment.