https://github.com/metonym/posthtml-plugin-template
Template for authoring PostHTML plugins in TypeScript
https://github.com/metonym/posthtml-plugin-template
posthtml posthtml-plugin tape template travis-ci typescript
Last synced: 7 months ago
JSON representation
Template for authoring PostHTML plugins in TypeScript
- Host: GitHub
- URL: https://github.com/metonym/posthtml-plugin-template
- Owner: metonym
- License: mit
- Created: 2020-04-18T15:18:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-10T17:44:21.000Z (almost 6 years ago)
- Last Synced: 2025-03-17T02:14:03.018Z (12 months ago)
- Topics: posthtml, posthtml-plugin, tape, template, travis-ci, typescript
- Language: TypeScript
- Size: 106 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# posthtml-plugin-template 
[![Build][build]][build-badge]
> Template for authoring PostHTML plugins in TypeScript.
Inspired by the [posthtml-plugin-boilerplate](https://github.com/posthtml/posthtml-plugin-boilerplate), this template is used to develop and build [PostHTML](https://github.com/posthtml) plugins with TypeScript.
The `posthtml-plugin-boilerplate` contains an excellent sample [README](https://github.com/posthtml/posthtml-plugin-boilerplate/blob/master/readme.md) to describe and document a plugin.
Don't forget to update the [changelog](CHANGELOG.md) for each release published to the [npm registry](https://www.npmjs.com/).
## 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:
```bash
yarn publish
# OR
npm publish
```
Update the relevant publishing-related fields in [package.json](package.json).
```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](LICENSE)
[build]: https://travis-ci.com/metonym/posthtml-plugin-template.svg?branch=master
[build-badge]: https://travis-ci.com/metonym/posthtml-plugin-template