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

Ignore source map files by default #399

Merged
merged 1 commit into from
Dec 20, 2021
Merged

Conversation

djfpaagman
Copy link
Contributor

Source maps are becoming more popular. Rails 7 is moving towards replacing Webpacker with other tools, for example jsbundling-rails. This gem puts build files in the app/assets/builds directory:

This gem provides installers to get you going with the bundler of your choice in a new Rails application, and a convention to use app/assets/builds to hold your bundled output as artifacts that are not checked into source control

If you use jsbundling-rails and enable source maps they are picked up by i18n-tasks, for example:

❯ i18n-tasks missing
Missing translations (2) | i18n-tasks v0.9.35
+--------+-----+-------------------------------------------------+
| Locale | Key | Value in other locales or source |
+--------+-----+-------------------------------------------------+
| all | !0 | app/assets/builds/application.js.map:4 (1 more) |
| all | !1 | app/assets/builds/application.js.map:4 (2 more) |
+--------+-----+-------------------------------------------------+

I think it makes sense to ignore these by default, so I've simply added the extension to the exclude list.

Let me know if this is not a way forward, I'm happy to change the approach.

I also just noticed that the list of extensions in the template .yml does not match the actual exclude list, is that something to sync up as well?

@glebm glebm merged commit a6d4495 into glebm:main Dec 20, 2021
@glebm
Copy link
Owner

glebm commented Dec 20, 2021

Thanks! Yeah, it'd probably make sense to sync up the list in the .yml as well

@djfpaagman djfpaagman deleted the ignore-sourcemaps branch December 22, 2021 08:23
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