diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-10-22 10:03:57 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-22 10:03:57 +0900 |
commit | ced65eb9a71e0cd6bd413a1e9996d942a7946b4a (patch) | |
tree | 427bc9ac225fb38430c857abcf5fc535610d1e4c /railties | |
parent | 855ae222a9a4053c2b4f489d540bbb83cd92d95e (diff) | |
parent | f11cfd40687402bc13ef3fe87b998b7a624da7e0 (diff) | |
download | rails-ced65eb9a71e0cd6bd413a1e9996d942a7946b4a.tar.gz rails-ced65eb9a71e0cd6bd413a1e9996d942a7946b4a.tar.bz2 rails-ced65eb9a71e0cd6bd413a1e9996d942a7946b4a.zip |
Merge pull request #34274 from bogdanvlviv/remove-yarn-files-from-gitignore-template
Remove yarn's files from `.gitignore` template
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/gitignore.tt | 7 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 10 |
2 files changed, 1 insertions, 16 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/gitignore.tt b/railties/lib/rails/generators/rails/app/templates/gitignore.tt index 4e114fb1d9..38c3ab1319 100644 --- a/railties/lib/rails/generators/rails/app/templates/gitignore.tt +++ b/railties/lib/rails/generators/rails/app/templates/gitignore.tt @@ -28,13 +28,8 @@ !/storage/.keep <% end -%> <% end -%> - -<% unless options.skip_yarn? -%> -/node_modules -/yarn-error.log - -<% end -%> <% unless options.api? -%> + /public/assets <% end -%> .byebug_history diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 398466aa22..9b980bd52b 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -339,11 +339,6 @@ module SharedGeneratorTests run_generator assert_file "#{application_path}/package.json", /dependencies/ assert_file "#{application_path}/config/initializers/assets.rb", /node_modules/ - - assert_file ".gitignore" do |content| - assert_match(/node_modules/, content) - assert_match(/yarn-error\.log/, content) - end end def test_generator_for_yarn_skipped @@ -354,10 +349,5 @@ module SharedGeneratorTests assert_file "#{application_path}/config/initializers/assets.rb" do |content| assert_no_match(/node_modules/, content) end - - assert_file ".gitignore" do |content| - assert_no_match(/node_modules/, content) - assert_no_match(/yarn-error\.log/, content) - end end end |