Skip to content

Commit

Permalink
Improve Module API docs & example (#26637)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Nov 28, 2023
1 parent 2ee0826 commit 4c18292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_config.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ modules:
# An example of pulling a module from NPM
- "@vector-im/element-web-ilag-module@^0.0.1"

# An example of pulling a module from github
- "github:vector-im/element-web-ilag-module#main"
# An example of pulling a module from local filesystem during development
- "file:/home/user/development/element-web-ilag-module"
2 changes: 2 additions & 0 deletions docs/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ The following requirements are key for any module:
which takes a single parameter: a `ModuleApi` instance. This instance is passed to `super()`.
3. The module must be deployed in a way where `yarn add` can access it, as that is how the build system will try to
install it. Note that while this is often NPM, it can also be a GitHub/GitLab repo or private NPM registry.
Be careful when using git dependencies in yarn classic, many lifecycle scripts will not be executed which may mean
that your module is not built and thus may fail to be imported.

... and that's pretty much it. As with any code, please be responsible and call things in line with the documentation.
Both `RuntimeModule` and `ModuleApi` have extensive documentation to describe what is proper usage and how to set things
Expand Down

0 comments on commit 4c18292

Please sign in to comment.