{"repo":"webdiscus/pug-plugin","free":true,"listed":false,"github":"https://github.com/webdiscus/pug-plugin","clone":"git clone https://github.com/webdiscus/pug-plugin.git","description":"Renders Pug template to HTML or template function. Resolves source files of scripts, styles, images in Pug . Uses Pug template as entry point.","language":"JavaScript","stars":75,"topics":["webpack","pug","pug-loader","html","loader","plugin","pug-plugin","render","template","entry"],"license":"ISC","category":"saas-starters-boilerplates","readme_excerpt":"Pug Plugin for Webpack The plugin renders Pug templates with referenced source asset files into HTML --- Pug template as entry point The Pug Plugin generates static HTML or template function from Pug template containing source files of scripts, styles, images, fonts and other resources, similar to how it works in Vite. This plugin allows using a template file as an entry point. The plugin resolves source files of assets in templates and replaces them with correct output URLs in the generated HTML. The resolved assets will be processed via Webpack plugins/loaders and placed into the output directory. You can use a relative path or Webpack alias to a source file. A template imported in JS will be compiled into template function. You can use the template function in JS to render the template with variables in runtime on the client-side in the browser. 💡 Highlights - An entry point is the Pug template. - Auto processing multiple templates in the entry path. - Allows to specify script and style source files directly in Pug : - link(href=\"./style.scss\" rel=\"stylesheet\") - script(src=\"./app.tsx\" defer=\"defer\") - Resolves source files in default attributes href src srcset etc. using relative path or alias : - link(href=\"../images/favicon.svg\" type=\"image/svg\" rel=icon) - img(src=\"@images/pic.png\" srcset=\"@images/pic400.png 1x, @images/pic800.png 2x\") - Inlines JS and CSS into HTML. - Inlines images into HTML and CSS. - Compile the Pug template into template function for usage in JS ","default_branch":null,"files":null,"tree":[],"storefront":"/r/webdiscus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/webdiscus/pug-plugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}