ampproject / amp-by-example

DEPRECATED: AMP by Example has been merged into amp.dev
http://amp.dev
Apache License 2.0
753 stars 505 forks source link

Allow parseSample to override content #2028

Closed fstanis closed 5 years ago

fstanis commented 5 years ago

Allow parseSample to override file contents instead of reading from fs. This is useful for on-the-fly processing, e.g. the file was created in-memory and isn't stored on the disk, such as gulp Vinyl.

Related to ampproject/docs#2389.

fstanis commented 5 years ago

Interesting side-effect: this significantly speeds up sample build time for amp.dev.