Git Product home page Git Product logo

parcel-plugin-pebble's People

Contributors

dependabot[bot] avatar stepbeekio avatar

Watchers

 avatar

parcel-plugin-pebble's Issues

Handle other resource types appropriately

Pebble isn't just for HTML, it's a perfectly good tool for rendering JS or CSS etc too. As such, the tool should have some way of identifying what type of resource a file is from its extension: e.g. .js.peb.

It might allow configuration, but I'd like to see how far I can get without it.

Allow custom file extensions

Since this plugin should work well with jinja or twig we should allow users to customize the file extensions it applies to.

Inline styles with calc causing build failure

Inline styles with calc values depending on pebble variables are causing build failures in the minification step.

To reproduce:

<div style="height: calc(100px/{{ foo }})"></div>

This is caused by PostCSS attempting to precalculate this value at build time. Since we're probably only using inline styles when we want to bind to some server-side model, it is unlikely that we would be able to precalculate these values anyway. However, we don't think that disabling this behaviour by default on this plugin is the correct decision. We think it should be disabled on a per-project basis.

To disable, create a file in base directory cssnano.config.js with contents

module.exports = {
    preset: ['default', {
        calc: false
    }]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.