diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-21 13:50:33 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-21 15:39:51 +0200 |
commit | 365783532ea7942b96f5e83f4a4dc8f433a07603 (patch) | |
tree | 6a0c399f6557d298d51c6639d3cac8aada652a34 /support/doc | |
parent | 0cd6ffc09cd76951fea3d861a6bda7f5984cb9d2 (diff) | |
download | PeerTube-365783532ea7942b96f5e83f4a4dc8f433a07603.tar.gz PeerTube-365783532ea7942b96f5e83f4a4dc8f433a07603.tar.zst PeerTube-365783532ea7942b96f5e83f4a4dc8f433a07603.zip |
Add client build instructions to plugins
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/plugins/guide.md | 25 |
1 files changed, 25 insertions, 0 deletions
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 | |||
498 | } | 498 | } |
499 | ``` | 499 | ``` |
500 | 500 | ||
501 | ### Build your plugin | ||
502 | |||
503 | If you added client scripts, you'll need to build them using webpack. | ||
504 | |||
505 | Install webpack: | ||
506 | |||
507 | ``` | ||
508 | $ npm install | ||
509 | ``` | ||
510 | |||
511 | Add/update your files in the `clientFiles` array of `webpack.config.js`: | ||
512 | |||
513 | ``` | ||
514 | $ $EDITOR ./webpack.config.js | ||
515 | ``` | ||
516 | |||
517 | Build your client files: | ||
518 | |||
519 | ``` | ||
520 | $ npm run build | ||
521 | ``` | ||
522 | |||
523 | You built files are in the `dist/` directory. Check `package.json` to correctly point to them. | ||
524 | |||
525 | |||
501 | ### Test your plugin/theme | 526 | ### Test your plugin/theme |
502 | 527 | ||
503 | You'll need to have a local PeerTube instance: | 528 | You'll need to have a local PeerTube instance: |