From 365783532ea7942b96f5e83f4a4dc8f433a07603 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Aug 2020 13:50:33 +0200 Subject: Add client build instructions to plugins --- support/doc/plugins/guide.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'support/doc/plugins') diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 41d70c372..d6d2114da 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md @@ -498,6 +498,31 @@ Translation files are just objects, with the english sentence as the key and the } ``` +### Build your plugin + +If you added client scripts, you'll need to build them using webpack. + +Install webpack: + +``` +$ npm install +``` + +Add/update your files in the `clientFiles` array of `webpack.config.js`: + +``` +$ $EDITOR ./webpack.config.js +``` + +Build your client files: + +``` +$ npm run build +``` + +You built files are in the `dist/` directory. Check `package.json` to correctly point to them. + + ### Test your plugin/theme You'll need to have a local PeerTube instance: -- cgit v1.2.3