Skip to content

metonym/posthtml-plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posthtml-plugin-template

Build

Template for authoring PostHTML plugins in TypeScript.

Inspired by the posthtml-plugin-boilerplate, this template is used to develop and build PostHTML plugins with TypeScript.

The posthtml-plugin-boilerplate contains an excellent sample README to describe and document a plugin.

Don't forget to update the changelog for each release published to the npm registry.

Available Scripts

yarn test

Runs unit tests using tape as a test runner.

yarn test:tdd

Runs all tests in watch mode.

yarn prepack

Builds the plugin for production.

Publishing to npm

When publishing your plugin for the first time, be sure to update the homepage, repository and bugs fields in the package.json. Login as your npm user and run the following:

yarn publish
# OR
npm publish

Update the relevant publishing-related fields in package.json.

{
  "repository": {
    "type": "git",
    "url": "https://github.com/{USER}/posthtml-plugin-template.git"
  },
  "homepage": "https://github.com/{USER}/posthtml-plugin-template",
  "keywords": ["posthtml", "posthtml plugin", "plugin"],
  "bugs": "https://github.com/{USER}/posthtml-plugin-template/issues"
}

License

MIT