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

Allow passing options to transformers #6

Open
itsdouges opened this issue Apr 17, 2020 · 1 comment
Open

Allow passing options to transformers #6

itsdouges opened this issue Apr 17, 2020 · 1 comment

Comments

@itsdouges
Copy link

API for a program transformer is

function transformer(
  program: ts.Program,
  args: any // opts from ts config
) => ...

Atm I don't see a way to set options

const transformer = new Transformer()
  .addTransformer(classNamesTransformer) // what do
  .addMock({ name: '@compiled/css-in-js', content: `export const ClassNames: any = () => null` })
  .setFilePath('/index.tsx');
@marionebl
Copy link
Owner

Sure, let's add this. Will have to mull a bit what would be most appropriate, first stab:

const transformer = new Transformer()
  .addTransformer(transformer, transformerOptions)

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

No branches or pull requests

2 participants