@sdl/delivery-ish-dd-webapp-gui
TypeScript icon, indicating that this package has built-in type declarations

2.2.11 • Public • Published

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:

  1. 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.
  2. Find proxies section in buildOptions object definition. proxies section is a list of proxy definitions
  3. Add proxy definition:
var buildOptions = {
    ...
    proxies: [{
        from: "/api",
        to: "http://url.to.your.api/api"
    }]
}
  1. Where from is a route(e.g. ), and to is the REST API root url where all requests will be rerouted to.

  2. Open file src/index.html and check if window.SdlDitaDeliveryMocksEnabled setting is set to false 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):

  1. TSLint: get linting feedback as you type
  2. Editor Config: adds support for the .editorconfig file
  3. Document this: automatically generates detailed JSDoc comments in TypeScript and javascript files

Readme

Keywords

none

Package Sidebar

Install

npm i @sdl/delivery-ish-dd-webapp-gui

Weekly Downloads

1

Version

2.2.11

License

Apache-2.0

Unpacked Size

31.7 MB

Total Files

2967

Last publish

Collaborators

  • benginear
  • artefact-publishers
  • janb87
  • rumbalaidea
  • beardcore
  • frnkclsst
  • oleksii