Skip to content

michigandaily/parcel-transformer-nunjucks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-transformer-nunjucks

Transformer for parcel that allows for nunjucks templating.

This loads data from JSON files specified in config.json, as well as config.json itself.

// .parcelrc
{
  "extends": "@parcel/config-default",
  "transformers": {
      "*.html": ["@michigandaily/parcel-transformer-nunjucks", "..."]
  }
}

Note: updates to the source JSON files won't cause Parcel to rebuild; you need to manually trigger a rebuild by e.g. touching or saving the HTML file.

Run npx parcel build when developing to test the transformer.