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

Add postcss and terser filters #97

Merged
merged 2 commits into from
May 21, 2021
Merged

Add postcss and terser filters #97

merged 2 commits into from
May 21, 2021

Conversation

valtlai
Copy link
Contributor

@valtlai valtlai commented May 20, 2021

This adds the postcss and terser filters to the corresponding plugins.

Using them:

{% set css %}
  body::after {
    content: "Hello, the CSS world!";
  }
{% endset %}

{% set js %}
  console.log("Hello, the JavaScript world!");
{% endset %}

<style>
  {{- css | postcss | safe -}}
</style>

<script type="module">
  {{- js | terser | safe -}}
</script>

@oscarotero What do you think?

@oscarotero
Copy link
Member

Yes, I like it. Good idea.

@oscarotero oscarotero merged commit cc800a4 into master May 21, 2021
@oscarotero oscarotero deleted the css-js-filters branch May 21, 2021 12:13
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.

2 participants