Skip to content

A basic parcel plugin to fix issues with building pebble templates

License

Notifications You must be signed in to change notification settings

HappyValleyIO/parcel-plugin-pebble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-plugin-pebble

A basic parcel plugin to fix issues with building pebble templates

Install

Simple install the plugin and parcel will do the rest:

npm i -D @happyvalleyio/parcel-plugin-pebble

What it does

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.

Future work

What do now

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

Contributing

Feel free to open a pull request. We use this project in production so should be fairly quick to respond.

About

A basic parcel plugin to fix issues with building pebble templates

Resources

License

Stars

Watchers

Forks

Packages

No packages published