A basic parcel plugin to fix issues with building pebble templates
Simple install the plugin and parcel will do the rest:
npm i -D @happyvalleyio/parcel-plugin-pebble
This is a stupidly simple plugin currently. It treats any .peb
files as HTML but does not attempt to process any
url that contains pebble syntax. As an example,
<a href="/secure/{{ resource.resourceId }}">Go to resource</a>
This would normally fail to build due to parcel attempting to resolve secure/{{ resource.resourceId }}
as a dependency.
We ignore any url that contains {{ something }}
and allow parcel to happily treat the rest of the doc as HTML.
We want to add some configuration:
- allow custom file extensions (for jinja or twig templates for instance) (issue)
- allow processing other resource types than HTML (issue)
- any other problems we run into while trying to build pebble templates with parcel
Feel free to open a pull request. We use this project in production so should be fairly quick to respond.