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 sourceMap options to PostCSS #147

Merged
merged 7 commits into from
Nov 17, 2021
Merged

Conversation

fserb
Copy link
Contributor

@fserb fserb commented Nov 16, 2021

PostCSS accepts boolean | SourceMapOptions as options.map.
This slightly changes the default behavior, as "map: true" will default to inline.

We can change it to options.sourceMap === true ? {inline: false} : options.sourceMap, but I'm not sure is worth keeping the extra weirdness. WDYT?

PostCSS accepts `boolean | SourceMapOptions` as `options.map`.
This slightly changes the default behavior, as "map: true" will default to inline.

We can change it to `options.sourceMap === true ? {inline: false} : options.sourceMap`, but I'm not sure is worth keeping the extra weirdness. WDYT?
@oscarotero
Copy link
Member

Mmmm, ok, it makes sense.
Could you change the type in the Options interface?

@fserb
Copy link
Contributor Author

fserb commented Nov 16, 2021

like this?

@oscarotero
Copy link
Member

Yes, but no need to replicate the types in the dep file. Postcss provides the types here: https://deno.land/x/postcss@8.3.11/lib/postcss.d.ts#L258

@fserb
Copy link
Contributor Author

fserb commented Nov 17, 2021

I have no idea if this is the proper way to lift a definition from a d.ts. :)

@oscarotero oscarotero merged commit 0304503 into lumeland:master Nov 17, 2021
@oscarotero
Copy link
Member

Thanks!

@fserb fserb deleted the patch-3 branch November 17, 2021 13:59
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.

None yet

2 participants