{"id":13775142,"url":"https://github.com/KiaraGrouwstra/rollup-plugin-pug-html","last_synced_at":"2025-05-11T07:32:02.791Z","repository":{"id":65472199,"uuid":"69957760","full_name":"KiaraGrouwstra/rollup-plugin-pug-html","owner":"KiaraGrouwstra","description":"Rollup plugin that allows importing Pug templates as HTML strings","archived":false,"fork":true,"pushed_at":"2016-10-12T01:56:04.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T18:05:53.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"aMarCruz/rollup-plugin-pug","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KiaraGrouwstra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-04T11:16:39.000Z","updated_at":"2022-09-25T06:06:54.000Z","dependencies_parsed_at":"2023-01-25T01:45:17.602Z","dependency_job_id":null,"html_url":"https://github.com/KiaraGrouwstra/rollup-plugin-pug-html","commit_stats":null,"previous_names":["tycho01/rollup-plugin-pug-html"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KiaraGrouwstra%2Frollup-plugin-pug-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KiaraGrouwstra%2Frollup-plugin-pug-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KiaraGrouwstra%2Frollup-plugin-pug-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KiaraGrouwstra%2Frollup-plugin-pug-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KiaraGrouwstra","download_url":"https://codeload.github.com/KiaraGrouwstra/rollup-plugin-pug-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225027340,"owners_count":17409414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:34.405Z","updated_at":"2024-11-17T10:30:36.025Z","avatar_url":"https://github.com/KiaraGrouwstra.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Templating"],"readme":"[![Build Status][build-image]][build-url]\n[![npm Version][npm-image]][npm-url]\n[![License][license-image]][license-url]\n\n# rollup-plugin-pug-html\n\n[Rollup](https://github.com/rollup/rollup) plugin that allows importing [pug](https://pugjs.org/) templates as HTML strings.\n\n## Installation\n\n```bash\nnpm install --save-dev rollup-plugin-pug-html\n```\n\n## Usage\n\nCreate the template:\n\n```jade\n//- template.pug\np Hello #{ name }\n```\n\nImport the template:\n\n```js\n// main.js\nimport html from './template.pug';\nconsole.log(html);  // \u003cp\u003eHello World\u003c/p\u003e\n```\n\nAnd build with something like...\n\n```js\nimport { rollup } from 'rollup';\nimport pug from 'rollup-plugin-pug-html';\n\nrollup({\n  entry: 'src/main.js',\n  plugins: [\n    pug({\n      // By default, all .jade and .pug files are compiled\n      // extensions: [ '.jade', '.pug' ],\n      // You can restrict which files are compiled\n      // using `include` and `exclude`\n      include: 'src/components/**.pug',\n      // You can use native pug options as well.\n      pretty: true,\n      // You can also pass context for the Pug variables:\n      context: { name: 'World' },\n    })\n  ]\n}).then(...)\n```\n\nThat's it.\n\n## Options\n\nThis plugin is using the following pug options as defaults:\n\n```js\n{\n  doctype: 'html',\n  name: 'template',\n  compileDebug: false,\n  inlineRuntimeFunctions: false,\n  context: {},\n}\n```\n\nSee the full list and explanation in the [API Documentation](https://pugjs.org/) of the Pug site.\n\n## Licence\n\nMIT\n\n[build-image]:    https://img.shields.io/travis/tycho01/rollup-plugin-pug-html.svg\n[build-url]:      https://travis-ci.org/tycho01/rollup-plugin-pug-html\n[npm-image]:      https://img.shields.io/npm/v/rollup-plugin-pug-html.svg\n[npm-url]:        https://www.npmjs.com/package/rollup-plugin-pug-html\n[license-image]:  https://img.shields.io/npm/l/express.svg\n[license-url]:    https://github.com/tycho01/rollup-plugin-pug-html/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKiaraGrouwstra%2Frollup-plugin-pug-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKiaraGrouwstra%2Frollup-plugin-pug-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKiaraGrouwstra%2Frollup-plugin-pug-html/lists"}