Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default extensions and move to installer #1181

Merged
merged 2 commits into from
Jan 21, 2018

Conversation

gauravtiwari
Copy link
Member

Fixes: #1148

This PR moves out extensions from webpacker.yml to specific installer.

@@ -12,6 +12,9 @@
"environment.loaders.append('coffee', coffee)\n",
before: "module.exports"

say "Updating webpack paths to include .coffee file extension"
insert_into_file Webpacker.config.config_path, " - .coffee\n", after: /extensions:\n/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inserting YAML like this at the corrected indentation level seems a little brittle. Do we do it this way elsewhere in Rails?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't find any reference but this is how it's done in Rails: https://github.com/rails/rails/blob/63f0c04850dd0bcdc7d35266e81fa1a7778570a8/railties/lib/rails/generators/actions.rb#L326

May be we can borrow that method.

@javan
Copy link
Contributor

javan commented Jan 15, 2018

Do we use these extensions on the Ruby side anywhere?

@gauravtiwari
Copy link
Member Author

Nope we aren't using it internally.

@gauravtiwari
Copy link
Member Author

Merging this for now :)

@gauravtiwari gauravtiwari merged commit d21f15c into master Jan 21, 2018
@gauravtiwari gauravtiwari deleted the update-default-extensions branch January 21, 2018 17:32
kawikadkekahuna added a commit to wealthfit/webpacker that referenced this pull request Jan 29, 2018
* 'master' of https://github.com/rails/webpacker: (21 commits)
  Update Ruby versions on Travis CI (rails#1230)
  Make rubocop happy
  Fix asset helper for non-css assets in hmr mode
  CSP warning for Rails 5.2
  use 2 spaces for indentation in template injection
  Update README.md (rails#1198)
  Remove duplicate yarn-error.log (rails#1197)
  3.2.1
  Revert file loader (rails#1196)
  Update default extensions and move to installer (rails#1181)
  Gitignore (rails#1195)
  Update uglify plugin (rails#1194)
  Fixes Vue root instance initialization (rails#1187)
  Return false in production environments (rails#1179)
  Fix url loader doc[ci skip] (rails#1183)
  Use inject_into_file to support rails 4.2
  Update gems and npm deps (rails#1180)
  asset_pack_path + HMR fix; Closes rails#1171 (rails#1172)
  enhance CHANGELOG.md (rails#1170)
  CI against Ruby 2.5.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants