Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marlonmarcello/vite-plugin-pug
Pug template engine plugin for Vite.
https://github.com/marlonmarcello/vite-plugin-pug
Last synced: 3 months ago
JSON representation
Pug template engine plugin for Vite.
- Host: GitHub
- URL: https://github.com/marlonmarcello/vite-plugin-pug
- Owner: marlonmarcello
- License: mit
- Archived: true
- Created: 2021-02-03T01:23:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-03T19:45:41.000Z (almost 4 years ago)
- Last Synced: 2024-09-26T02:27:57.138Z (3 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @marlonmarcello/vite-plugin-pug
**NOTE:** Discontinued, please see https://github.com/vitejs/vite/issues/1861#issuecomment-772746928
-----------------------
This plugin adds support for the [Pug](https://pugjs.org/) template engine to [Vite](https://vitejs.dev/).### Install
```
npm install --save-dev @marlonmarcello/vite-plugin-pug
```### Usage
Add `@marlonmarcello/vite-plugin-pug` to your [Vite config file](https://vitejs.dev/config/):
```js
// vite.config.js
import vitePluginPug from "@marlonmarcello/vite-plugin-pug";export default {
plugins: [vitePluginPug()],
};
```### Options
You can pass all default [Pug Options](https://pugjs.org/api/reference.html#options) plus:
- `data: object` - Any data that you would like available globaly to templates
### Example
```js
import vitePluginPug from "@marlonmarcello/vite-plugin-pug";export default {
plugins: [
vitePluginPug({
data: {
meta: {
title: "My awesome website",
},
},
}),
],
};
``````pug
doctype html
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
title!=meta.title
body
//- template
```