happyvalleyio / parcel-plugin-pebble Goto Github PK
View Code? Open in Web Editor NEWA basic parcel plugin to fix issues with building pebble templates
License: MIT License
A basic parcel plugin to fix issues with building pebble templates
License: MIT License
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.
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 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
}]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.