{"id":22846496,"url":"https://github.com/jsonkao/snowpack-plugin-posthtml","last_synced_at":"2025-03-31T05:41:17.911Z","repository":{"id":57122541,"uuid":"352636500","full_name":"jsonkao/snowpack-plugin-posthtml","owner":"jsonkao","description":"This plugin adds PostHTML support to any Snowpack project.","archived":false,"fork":false,"pushed_at":"2021-03-29T14:50:37.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T03:55:07.811Z","etag":null,"topics":["posthtml","snowpack","snowpack-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsonkao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-29T12:32:44.000Z","updated_at":"2021-03-29T21:46:11.000Z","dependencies_parsed_at":"2022-08-24T14:59:30.135Z","dependency_job_id":null,"html_url":"https://github.com/jsonkao/snowpack-plugin-posthtml","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonkao%2Fsnowpack-plugin-posthtml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonkao%2Fsnowpack-plugin-posthtml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonkao%2Fsnowpack-plugin-posthtml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonkao%2Fsnowpack-plugin-posthtml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsonkao","download_url":"https://codeload.github.com/jsonkao/snowpack-plugin-posthtml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246423494,"owners_count":20774796,"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":["posthtml","snowpack","snowpack-plugin"],"created_at":"2024-12-13T03:29:18.692Z","updated_at":"2025-03-31T05:41:17.891Z","avatar_url":"https://github.com/jsonkao.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jsonkao/snowpack-plugin-posthtml\n\nThis plugin adds [PostHTML](https://github.com/posthtml/posthtml) support to any Snowpack project. The plugin loads your PostHTML configuration and reloads dependent HTML files when the configuration changes.\n\n## Usage\n\n```sh\nnpm i -D @jsonkao/snowpack-plugin-posthtml\n```\n\nThen add the plugin to your Snowpack config:\n\n```js\n// snowpack.config.js\n\nmodule.exports = {\n  plugins: [\n    [\n      '@jsonkao/snowpack-plugin-posthtml',\n      {\n        /* see options below */\n      },\n    ],\n  ],\n};\n```\n\n## Plugin Options\n\nPostHTML configuration works out of the box. The following plugin options help when you want the changing of that configuration to reload your HTML and refresh the dev page.\n\n| Name   |              Type              | Description                                                   |\n| :----- | :----------------------------: | :------------------------------------------------------------ |\n| `root` |       `string, string[]`       | Specify the local directories in which the HTML should be reloaded on configuration change |\n| `configOptions.*` | `object` | Pass [`posthtml-load-config` options](https://github.com/posthtml/posthtml-load-config/blob/master/index.js#L14) directly to the loader (see `configOptions`).\n\n## `configOptions`\n\nThese options are passed directtly into the main [`posthtml-load-config` function](https://github.com/posthtml/posthtml-load-config/blob/master/index.js#L14). They may be helpful, for instance, if your PostHTML configuration is not in your application's root directory.\n\n| Name   |              Type              | Description                                                   |\n| :----- | :----------------------------: | :------------------------------------------------------------ |\n| `ctx`  | `object` | The context [evaluated while](https://github.com/posthtml/posthtml-load-config#context) loading your config |\n| `path`  | `string` | Path in which I should look for your config |\n| `options`  | `object` | Options passed directly to [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig#cosmiconfigoptions) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonkao%2Fsnowpack-plugin-posthtml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsonkao%2Fsnowpack-plugin-posthtml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonkao%2Fsnowpack-plugin-posthtml/lists"}