add dokuwiki sources for dev

This commit is contained in:
2026-01-15 20:40:33 +01:00
parent dd74499339
commit 95a0e94b4a
6 changed files with 54 additions and 1 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "_dokuwiki"]
path = _dokuwiki
url = https://github.com/dokuwiki/dokuwiki.git

19
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,19 @@
{
// Developer quality-of-life:
// If you add a DokuWiki checkout as ./_dokuwiki (see README), Intelephense will
// index it and resolve DokuWiki base classes (ActionPlugin, SyntaxPlugin, etc.).
"intelephense.environment.includePaths": [
"./_dokuwiki",
"./_dokuwiki/inc",
"./_dokuwiki/lib",
"./_dokuwiki/vendor"
],
// Keep the file explorer tidy when the optional DokuWiki checkout exists.
"files.exclude": {
"**/_dokuwiki/.git": true,
"**/_dokuwiki/data": true,
"**/_dokuwiki/conf": true,
"**/_dokuwiki/cache": true
}
}

View File

@@ -58,6 +58,35 @@ When adding new internal classes under the `dokuwiki\plugin\luxtools\` namespace
JavaScript is split into small modules under `js/` and registered via `action.php` so DokuWiki loads them in order.
## IDE support (developer notes)
This plugin extends and uses DokuWiki core classes (for example `dokuwiki\Extension\ActionPlugin`, `dokuwiki\Extension\SyntaxPlugin`, renderers, handlers). If you only open the plugin folder in your IDE, those types may show as “unknown”.
DokuWiki does not currently ship an official PHP “SDK”/stub package for IDEs. The most reliable way to get full type navigation and autocomplete is to have the DokuWiki sources available in your workspace.
Two recommended setups:
### Option A: Add DokuWiki as a git submodule (recommended for a single-folder workspace)
From the plugin root:
```bash
git submodule add https://github.com/dokuwiki/dokuwiki.git _dokuwiki
git submodule update --init --recursive
```
The repository includes a VS Code config in `.vscode/settings.json` that points Intelephense at `./_dokuwiki/*` so the classes resolve.
`deploy.sh` excludes `_dokuwiki/` to avoid deploying the dev-only checkout.
### Option B: Use a separate DokuWiki checkout next to the plugin (recommended if you dont want submodules)
- Clone DokuWiki into a sibling folder (outside this repo)
- Open a multi-root VS Code workspace with both folders
This avoids changing the git state of the plugin repo, but still gives the IDE access to DokuWikis class definitions.
## Configuration
luxtools is configured via its dedicated admin page:

1
_dokuwiki Submodule

Submodule _dokuwiki added at 47e4d6995f

View File

@@ -18,7 +18,7 @@ class action_plugin_luxtools extends ActionPlugin
/**
* Add plugin JavaScript files in a deterministic order.
*
* @param Event $event
* @param Event $event
* @param mixed $param
* @return void
*/

View File

@@ -68,6 +68,7 @@ RSYNC_ARGS=(
--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r
--exclude=deploy.sh
--exclude=.git/
--exclude=_dokuwiki/
--exclude=.github/
--exclude=.vscode/
--exclude=_test/