add dokuwiki sources for dev
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "_dokuwiki"]
|
||||||
|
path = _dokuwiki
|
||||||
|
url = https://github.com/dokuwiki/dokuwiki.git
|
||||||
19
.vscode/settings.json
vendored
Normal file
19
.vscode/settings.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
29
README.md
29
README.md
@@ -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.
|
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 don’t 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 DokuWiki’s class definitions.
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
luxtools is configured via its dedicated admin page:
|
luxtools is configured via its dedicated admin page:
|
||||||
|
|||||||
1
_dokuwiki
Submodule
1
_dokuwiki
Submodule
Submodule _dokuwiki added at 47e4d6995f
@@ -18,7 +18,7 @@ class action_plugin_luxtools extends ActionPlugin
|
|||||||
/**
|
/**
|
||||||
* Add plugin JavaScript files in a deterministic order.
|
* Add plugin JavaScript files in a deterministic order.
|
||||||
*
|
*
|
||||||
* @param Event $event
|
* @param Event $event
|
||||||
* @param mixed $param
|
* @param mixed $param
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ RSYNC_ARGS=(
|
|||||||
--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r
|
--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r
|
||||||
--exclude=deploy.sh
|
--exclude=deploy.sh
|
||||||
--exclude=.git/
|
--exclude=.git/
|
||||||
|
--exclude=_dokuwiki/
|
||||||
--exclude=.github/
|
--exclude=.github/
|
||||||
--exclude=.vscode/
|
--exclude=.vscode/
|
||||||
--exclude=_test/
|
--exclude=_test/
|
||||||
|
|||||||
Reference in New Issue
Block a user