question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parcel 2: Pug transformer

See original GitHub issue

Create the @parcel/transformer-pug package in packages/transforms/pug. This package is a Parcel 2 transform plugin for pug. It should be based on the PugAsset from Parcel 1.

The @parcel/transformer-pug package is responsible for the following things:

  • Loading config from .pugrc, .pugrc.js
  • Compiling pug to HTML
  • Collecting dependencies as included files so Parcel watches them

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mkg20001commented, Sep 11, 2019

@devongovett Almost right. It should allow for doing both at the same time, so it would first check whether it’s required from a JS file or an HTML file. The code to produce the result is very similar actually. I could try taking a stab at it, since I’ve already written the JS-only part for parcel v1 https://github.com/mkg20001/parcel-plugin-pug-client

Edit: The reason being, that both are required as .pug files. So it would pass through the same transformer initially.

1reaction
jkhercommented, Aug 13, 2019

Hey @devongovett, I can work on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@parcel/transformer-pug - npm
Latest version: 2.8.2, last published: 4 days ago. Start using @parcel/transformer-pug in your project by running `npm i ...
Read more >
@parcel/transformer-pug NPM | npm.io
Automatically transforms modules using Babel, PostCSS, and PostHTML when needed - even node_modules . ✂️ Zero configuration code splitting using dynamic ...
Read more >
Pug - Parcel
Pug is a templating language that compiles to HTML. Parcel supports Pug automatically using the @parcel/transformer-pug plugin. When a .pug file is detected ......
Read more >
@parcel/transformer-pug | Yarn - Package Manager
@parcel/transformer-pug ... The format is based on Keep a Changelog and Parcel adheres to Semantic Versioning. ... Last commit: 2 weeks ago ...
Read more >
npm:parcel-transformer-pug-precompile - Skypack.dev
Plugin for parcel v2. Precompile pug templates into javascript sources exporting their compiling functions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found