@sdl/delivery-ish-dd-webapp-gui
v2.2.11
Published
GUI of the SDL Dita Delivery Web Application.
Downloads
10
Keywords
Readme
Dynamic Documentation GUI
GUI of the SDL Dynamic Documentation.
Building
In order to build make sure you have Node.js installed (v6 or higher).
Installing the necessary packages
npm install gulp-cli -g
npm install
You may need to install 'dita-ot' manually. For this download [dita-ot] (https://github.com/dita-ot/dita-ot/releases/download/2.5.4/dita-ot-2.5.4.zip), then unpack / copy to /gui/node-modules/dita-ot and run gradlew.bat manually. After that you may set file's attributes to read-only to prevent from being removed.
Gulp tasks
# Build (debug)
gulp build
# Build everything and setup a server (debug)
gulp serve
# Build everything and setup a server (release)
gulp serve:dist
# Build (release)
gulp
# Test (debug)
# Default browser is PhantomJS
gulp serve:test
gulp serve:test --browsers Chrome
gulp serve:test --browsers "Chrome,IE,Firefox,PhantomJS"
# Test (release)
# Default browser is PhantomJS
gulp test
gulp test --browsers Chrome
gulp test --browsers "Chrome,IE,Firefox,PhantomJS"
# Measure test coverage
# Default browser is PhantomJS
gulp test-coverage
gulp test-coverage --browsers Chrome
gulp test-coverage --browsers "Chrome,IE,Firefox,PhantomJS"
Setting Up GUI Development
Development over existing data
There is ability to develop over existing data. To do this you need to have DXA Web Application with Dynamic Documentation Module installed and connected to appropriate Content Delivery. Dynamic Documentation exposes particular REST API that GUI can consume. To setup that you need:
- Open gulpfile.js. In CD Layout it lies in
/[path to cd layout]/cd-layout-net/modules/DynamicDocumentation/web/gui/
or next to this readme.md file. - Find
proxies
section inbuildOptions
object definition.proxies
section is a list of proxy definitions - Add proxy definition:
var buildOptions = {
...
proxies: [{
from: "/api",
to: "http://url.to.your.api/api"
}]
}
Where
from
is a route(e.g. ), andto
is the REST API root url where all requests will be rerouted to.Open file
src/index.html
and check if window.SdlDitaDeliveryMocksEnabled setting is set tofalse
so that the data gets retrieved from real api end point configured by buildOption.proxies configuration section.
Setting up Visual Studio Code
Preffered IDE for GUI development is Visual Studio Code.
Some extensions you should install (Managing extensions):
- TSLint: get linting feedback as you type
- Editor Config: adds support for the .editorconfig file
- Document this: automatically generates detailed JSDoc comments in TypeScript and javascript files