New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jsonkao/snowpack-plugin-posthtml

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsonkao/snowpack-plugin-posthtml

Adds PostHTML support to any Snowpack project; refreshes page automatically on configuration change.

  • 0.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

@jsonkao/snowpack-plugin-posthtml

This plugin adds PostHTML support to any Snowpack project. The plugin loads your PostHTML configuration and reloads dependent HTML files when the configuration changes.

Usage

npm i -D @jsonkao/snowpack-plugin-posthtml

Then add the plugin to your Snowpack config:

// snowpack.config.js

module.exports = {
  plugins: [
    [
      '@jsonkao/snowpack-plugin-posthtml',
      {
        /* see options below */
      },
    ],
  ],
};

Plugin Options

PostHTML 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.

NameTypeDescription
rootstring, string[]Specify the local directories in which the HTML should be reloaded on configuration change
configOptions.*objectPass posthtml-load-config options directly to the loader (see configOptions).

configOptions

These options are passed directtly into the main posthtml-load-config function. They may be helpful, for instance, if your PostHTML configuration is not in your application's root directory.

NameTypeDescription
ctxobjectThe context evaluated while loading your config
pathstringPath in which I should look for your config
optionsobjectOptions passed directly to cosmiconfig

Keywords

FAQs

Package last updated on 29 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc