UNPKG

8.41 kBMarkdownView Raw
1# fontoxml-development-tools [![NPM version](https://badge.fury.io/js/%40fontoxml%2Ffontoxml-development-tools.svg)](https://badge.fury.io/js/%40fontoxml%2Ffontoxml-development-tools)
2
3The Fonto Development Tools are command-line tools which offer support for developers when configuring Fonto Editor instances and its complementary products, and facilitate running them locally for testing purposes. They act as a gateway to the Fonto SDK and can be used for creating and updating editor instances, and preparing XML schemas for use with Fonto.
4
5## Installation
6
7### Node
8
9The tools require [NPM](https://www.npmjs.com/get-npm) on [Node.js®](https://nodejs.org/) version 12.20.x or higher, which are freely available. An active or maintenence LTS release is recommended. After installing Node.js, you can install the latest version of the Fonto Development Tools globally on your system using the following command:
10
11 npm i -g @fontoxml/fontoxml-development-tools
12
13Alternatively, the tools can be installed locally for your project using the following command:
14
15 npm install --save-dev @fontoxml/fontoxml-development-tools
16
17> **tip**: You can use Node Version Manager on Linux/MacOS or its Windows counterpart to install and use multiple version of Node.js on a single system. This is useful if you develop different projects with different versions of Node.js.
18
19### Docker
20
21Certain commands, like `review run` and `review build`, require [Docker Community Edition](https://www.docker.com/) to be installed.
22
23> **tip**: Docker places their installers behind an unnecessary login. Use the following direct links to avoid having to create an account: [Windows installer](https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe), [macOS installer](https://download.docker.com/mac/stable/Docker.dmg). For Linux, Docker Community Edition is usually available through package managers.
24
25## Usage
26
27Get help for the available commands:
28
29 fontoxml-development-tools --help
30
31Get help for a specific command, detailing all its arguments:
32
33 fontoxml-development-tools <command> --help
34
35Output the current version:
36
37 fontoxml-development-tools --version
38
39Use the `fdt` shorthand instead of `fontoxml-development-tools`:
40
41 fdt <command> --help
42
43## Development license
44
45Certain commands, like `editor`, `connectors` and `content-quality`, require a valid developer license file on your system and the permissions to run them. A license file `fonto.lic` can be stored in either of these locations:
46
47- In your user home directory (`$HOME` on linux/MacOS, or `%homepath%` on Windows).
48- In an ancestor folder of where you are running the `fdt` command.
49
50Verify that your license file is installed correctly by running the `fdt license validate` command.
51
52To obtain a license file, or to obtain additional permissions, please contact us at https://fontoxml.com/contact-us/ or reach out to your Fonto contact if you have one available. License files are personal and we disadvice to store them in any version control system you might have.
53
54## Usage examples
55
56### Licensing
57
58Validate and update the currently installed license file:
59
60 fdt license validate
61
62### Schema
63
64Output a table with information about all attributes in a schema:
65
66 fdt attributes [--schema <schemaPath>] [--columns name ns use defaultvalue ...]
67
68Output schema information about a specific attribute, including all its definitions:
69
70 fdt attribute <attributeName> [--schema <schemaPath>]
71
72Output a table with information about all elements in a schema:
73
74 fdt elements [--schema <schemaPath>] [--columns name ns local desc atts ...]
75
76Output schema information about a specific element, including detailed content model info:
77
78 fdt element <elementName> [--schema <schemaPath>]
79
80Output a table with information about all schemas:
81
82 fdt schemas [--columns package locations path]
83
84Output a table with information about all simple types in a schema:
85
86 fdt simpletypes [--columns name variety format]
87
88### Operations
89
90Output a table with information about all operations in a repository:
91
92 fdt operations [--columns name file label desc key ...]
93
94Output information about a specific operation:
95
96 fdt operation <operationName>
97
98### Localization
99
100Extract messages from packages and save them in a message bundle template:
101
102 fdt localization extract [<output>] [--paths <package1> [<package2> ...]]
103
104Merge multiple message bundles into a single bundle:
105
106 fdt localization merge [<output>] --bundles <bundle1> <bundle2> [<bundle3> ...]
107
108Update message bundle with a new template bundle:
109
110 fdt localization update <output> <bundle> [--output-to-stdout]
111
112Output a table with information about all messages in a message (template) bundle:
113
114 fdt localization messages <bundle> [--search-in <search text>] [--search-out <search text>] [--search-package <search text>] [--search-file <search text>] [--with-conflicts] [--without-conflicts] [--with-out] [--without-out] [--no-table]
115
116### Editor
117
118Create a new instance of Fonto Editor:
119
120 fdt editor init [<output>] [--version <version|'nightly'>] [--name <name>] [--schema <path>] [--add-ons <addonName> [<addonName> ...]] [--non-interactive]
121
122Upgrade an instance of Fonto Editor:
123
124 fdt editor upgrade [--version <version|'nightly'>] [--non-interactive]
125
126Add add-ons to, or remove add-ons from, a Fonto Editor instance:
127
128 fdt editor add-ons [--add <addonName> [<addonName> ...]] [--remove <addonName> [<addonName> ...]] [--add-ons <addonName> [<addonName> ...]] [--non-interactive]
129
130Start a development server for running a Fonto Editor instance:
131
132 fdt editor run [--body-parser-limit <limit>] [--cache-control-disabled] [--cache-control-max-age <maxAge>] [--delay <delay>] [--disable-dist-authentication] [--dist] [--lock-not-acquired] [--lock-not-available] [--memory-store-ttl <seconds>] [--open] [--port] [--release-locks-on-state-request] [--savemode <savemode>] [--verbose]
133
134Create a build version of a Fonto Editor instance for production usage:
135
136 fdt editor build [--no-mangle]
137
138Compile a XSD schema to a schema format which can be used by Fonto Editor:
139
140 fdt editor schema compile [<input>] [--overwrite] [--version <version|'nightly'>]
141
142### Connectors
143
144Initialize a Fonto Connectors instance in an empty or non-existent directory:
145
146 fdt connectors init [--location <path>] --version <version>
147
148Run a Fonto Connectors instance with a self-signed certificate to test your configuration:
149
150 fdt connectors run [--location <path>] [--config-location <path>]
151
152Build a Fonto Connectors docker image for production use:
153
154 fdt connectors build [--location <path>] [--image-name <image-name>] [--image-tag <image-tag>]
155
156Upgrade an existing Fonto Connectors instance to the specified version:
157
158 fdt connectors upgrade [--location <path>] --version <version>
159
160Download a self-contained build:
161
162 fdt connectors download-self-contained --version <version> --runtime <runtime> [--location <path>]
163
164### Content Quality
165
166Initialize a Fonto Content Quality instance in an empty or non-existent directory:
167
168 fdt content-quality init [--location <path>] --version <version>
169
170Run a Fonto Content Quality instance to test your configuration:
171
172 fdt content-quality run [--location <path>] [--config-location <path>] [--port]
173
174Build a Fonto Content Quality docker image for production use:
175
176 fdt content-quality build [--location <path>] [--image-name <image-name>] [--image-tag <tag>]
177
178Upgrade an existing Fonto Content Quality instance to the specified version:
179
180 fdt content-quality upgrade [--location <path>] --version <version>
181
182Download a self-contained build:
183
184 fdt content-quality download-self-contained --version <version> --runtime <runtime> [--location <path>]
185
186### Document History
187
188Download a self-contained build:
189
190 fdt document-history download-self-contained --version <version> --runtime <runtime> [--location <path>]
191
192### Review
193
194Download a self-contained build:
195
196 fdt review download-self-contained --version <version> --runtime <runtime> [--location <path>]
197
198### Schema Compiler
199
200Download a self-contained build:
201
202 fdt schema-compiler download-self-contained --version <version> --runtime <runtime> [--location <path>]
203
204### Spell Checker
205
206Download a self-contained build:
207
208 fdt spell-checker download-self-contained --version <version> --runtime <runtime> [--location <path>]