ampproject / ampproject/amppackager

Expose Request "config" and "transformers" fields in transform_wasm

Open
#233 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
141
Forks
46
PR merge metrics
No merged PRs in 30d

Description

This would help us with integrating into other projects, such as [amp-toolbox](https://github.com/ampproject/amp-toolbox).

Proposed valid invocations:

```js
transform('https://example.com/', html) // uses DEFAULT config

transform('https://example.com/', {
config: 'VALIDATION'
})

transform('https://example.com/', html, {
config: 'CUSTOM',
transformers: [
'ampboilerplate',
'urlrewrite'
]
})

Contributor guide

Open the contributing guide

Research direction

Start at the transform_wasm entry point and review how transform currently accepts its arguments. Compare the supported calls with the proposed config and transformers forms; done means those fields can be supplied for the documented invocations and the existing default behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, wasm
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.