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 support for source maps and file exclusions #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cr7pt0gr4ph7
Copy link

@cr7pt0gr4ph7 cr7pt0gr4ph7 commented Feb 7, 2024

This pull request adds one per-file and two new global configuration options:

Global options:

  • sourcemaps: never | always | existing | development | production to control how source map files (.css.map) should be handled.
    Defaults to existing - see the last commit for the reasoning behind this.

  • process_static_files: false allows you to exclude files without YAML frontmatter from processing,
    which mirrors the rules used by the jekyll-sass-plugin and other converter plugins.
    Defaults to true to match current behavior - should probably be set to false in a future major release.

Per-file options:

  • process_with_autoprefixer: true | false can be used to control whether to apply autoprefixer on a per-file level.

The README file has been updated accordingly.

Lukas Waslowski added 4 commits February 7, 2024 13:30
This uses the already existing feature of Autoprefixer to update
existing source maps or create new ones.
Improve the presentation of the available configuration options in the README.
Reasoning: If the user already has a source map for a CSS file (either static or generated),
there is a high probability that they still want to have a functioning source map
after Autoprefixer has been applied.

Backwards compatibility: No files will be generated that weren't there in earlier versions;
source map files that were present but unusable because they didn't match
the transformed CSS will be fixed after updating the plugin.
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.

1 participant