After cloning the repository, install git submodules:
git submodule init && git submodule update
Install the dependencies and necessary build tools:
yarn install
Requirements for the VS Code IDE:
The following environment variables are required when building:
SPARQL_ENDPOINT
DOORS_NG_PREFIX
For example, on *nix, create a .env
file:
#!/bin/bash
export SPARQL_ENDPOINT='https://graph.xyz.org/sparql'
export DOORS_NG_PREFIX='https://jazz.xyz.org/rm/web#'
export LANG='en_US'
export LANG_FILE='lang.yaml'
export CYPRESS_CRASH_REPORTS=0
export EDITOR_SUPPLEMENT_SRC='http://localhost:3001/public/build/editor.dev.js'
export NODE_ENV='development'
To build the output javascript bundle:
source .env; yarn build
Or better yet, for development:
source .env; yarn dev
Identifiers for variables and parameters follow the Snake Typing Variable Prefix naming convention.
The project is configured in such a way that importing files can be done relative to the src/
directory using the mapped path prefix #/
. For example, the file src/vendor/confluence/module/my-confluence-module.ts
can use import AsyncLockPool from '#/util/async-lock-pool';
rather than [...] from '../../../util/async-lock-pool';
- Install the Tampermonkey extension in your browser. Supports: Chrome, Brave, Microsoft Edge, Safari, Firefox, Opera Next, Dolphin Browser, and UC Browser
- Create a new script and paste the following:
// ==UserScript==
// @name VE4 Confluence UI
// @namespace http://tampermonkey.net/
// @version 0.1
// @description For VE4 development within Confluence
// @author [email protected]
// @include https://{WIKI.XYZ.ORG}/display/{SPACE_KEY}/*
// @exclude https://{WIKI.XYZ.ORG}/display/{SPACE_KEY}/*.uat*
// @grant none
// ==/UserScript==
(function() {
const dm_script=document.createElement('script');
dm_script.src='http://localhost:3001/public/build/viewer.dev.js';
document.body.appendChild(dm_script)
})();
- Edit the appropriate substitutions in the script for the include and exclude URLs
- Open a terminal in the project root directory and run
$ python -m SimpleHTTPServer 3001
or Python 3$ python -m http.server 3001
- Open the wiki to a sample page and click the Tampermonkey extension to reload the page and enable the script