ampproject / amp.dev

The AMP Project Website.
https://amp.dev
Other
583 stars 694 forks source link

Ignore imported documents in version control #2442

Open matthiasrohmer opened 5 years ago

matthiasrohmer commented 5 years ago

Successor to #2277 via @fstanis and @pbakaus: rather than just having an easy to oversee comment block at the head of imported files the files should actually be ignored by version control.

This could either be achieved by dynamically writing the .gitignore file by using the information in platform/config/imports/spec.json. Though I fear that might cause additional confusion.

Another option would be to try to import all files into a common location and then ignore this location once - that's the solution I prefer and would implement.

sebastianbenz commented 5 years ago

@pbakaus what was the original intention to import the files into the repo?

+1 to importing all files into a common location.

pbakaus commented 5 years ago

Two reasons, AFAIK:

  1. Bootstrapping a development build is harder without an initial commit of the imported files
  2. Translated files need to be stored next to the original docs, I guess

Both might not be strong enough reasons to keep them in the repo. But we really need to think through localization. I've looped Sebastian into an internal email thread with a team who created a script to auto-track component localization, hope they can inform what to do here.