This is a sample template for weh plugins. To get started with your own plugin,
run the following commands:
$ git clone https://github.com/wehjs/plugin-template weh-your-plugin
$ cd weh-your-plugin
$ npm install
Here's some files you might be interested in adjusting:
README.md
LICENSE
package.json
lib/plugin.js
.github/settings.yml (for use with probot config)
To enable Travis support, go to http://travis-ci.org and enable your GitHub plugin
repository. The next time you push, a build should automatically get started.
To enable codecov support, do the same, but with http://codecov.io.
You can delete this code block once you've modified the template!
a short description of what your plugin does
- It does things!
- And also, it does other stuff that you might be interested in
npm install weh-your-plugin
const weh = require('@weh/weh')
const plugin = require('weh-your-plugin')
// enter our main function:
// the main function should be an async function so that
// it automatically returns a promise
weh(async site => {
// we register our plugin...
site.use(plugin)
// ...and initiate the build process
return site
})
To work on this repository, clone it and install the npm dependencies:
git clone https://github.com/YOURREPO
cd YOURREPO
npm install
There are a couple of npm scripts provided for convenience:
npm test
- runs linters and ava in ci modenpm run lint
- runs lintersnpm run ava
- only runs ava oncenpm run ava:ci
- runs ava in ci mode (generates coverage data)npm run ava:watch
- runs ava in watch modenpm run coverage
- generates coverage datanpm run update-coc
- pulls the latestweallbehave
code of conductnpm run deploy
- publishes npm package usingnp
- Your Name <yourname@example.org>
This repository operates under the weallbehave
Code of Conduct. Its contents can be found in CODE_OF_CONDUCT.md
.
MIT (see LICENSE document)