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

feat(cli): new flag --transform #987

Merged
merged 1 commit into from Jun 9, 2022
Merged

feat(cli): new flag --transform #987

merged 1 commit into from Jun 9, 2022

Conversation

Anber
Copy link
Collaborator

@Anber Anber commented Jun 9, 2022

Motivation

Previously, CLI could only extract styles from source files, but template tags were kept untouched.

Summary

This PR introduces two new options:

  • --transform or -t that say Linaria, that we want not only extract styles but also replace all template tags with their runtime representations;
  • --modules [name] or -m [name] that specify what type of import will be used: require(…) or import ….

With this PR and #976, it became possible to use pure tsc compiler and @linaria/cli as postprocessing for building libs.

@Anber Anber merged commit ad8ea3b into master Jun 9, 2022
@Anber Anber deleted the cli-inline-transform branch June 9, 2022 12:03
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

1 participant