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 |
|
3 | The 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 |
|
9 | The 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 |
|
13 | Alternatively, 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 |
|
21 | Certain 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 |
|
27 | Get help for the available commands:
|
28 |
|
29 | fontoxml-development-tools --help
|
30 |
|
31 | Get help for a specific command, detailing all its arguments:
|
32 |
|
33 | fontoxml-development-tools <command> --help
|
34 |
|
35 | Output the current version:
|
36 |
|
37 | fontoxml-development-tools --version
|
38 |
|
39 | Use the `fdt` shorthand instead of `fontoxml-development-tools`:
|
40 |
|
41 | fdt <command> --help
|
42 |
|
43 | ## Development license
|
44 |
|
45 | Certain 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 |
|
50 | Verify that your license file is installed correctly by running the `fdt license validate` command.
|
51 |
|
52 | To 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 |
|
58 | Validate and update the currently installed license file:
|
59 |
|
60 | fdt license validate
|
61 |
|
62 | ### Schema
|
63 |
|
64 | Output a table with information about all attributes in a schema:
|
65 |
|
66 | fdt attributes [--schema <schemaPath>] [--columns name ns use defaultvalue ...]
|
67 |
|
68 | Output schema information about a specific attribute, including all its definitions:
|
69 |
|
70 | fdt attribute <attributeName> [--schema <schemaPath>]
|
71 |
|
72 | Output a table with information about all elements in a schema:
|
73 |
|
74 | fdt elements [--schema <schemaPath>] [--columns name ns local desc atts ...]
|
75 |
|
76 | Output schema information about a specific element, including detailed content model info:
|
77 |
|
78 | fdt element <elementName> [--schema <schemaPath>]
|
79 |
|
80 | Output a table with information about all schemas:
|
81 |
|
82 | fdt schemas [--columns package locations path]
|
83 |
|
84 | Output a table with information about all simple types in a schema:
|
85 |
|
86 | fdt simpletypes [--columns name variety format]
|
87 |
|
88 | ### Operations
|
89 |
|
90 | Output a table with information about all operations in a repository:
|
91 |
|
92 | fdt operations [--columns name file label desc key ...]
|
93 |
|
94 | Output information about a specific operation:
|
95 |
|
96 | fdt operation <operationName>
|
97 |
|
98 | ### Localization
|
99 |
|
100 | Extract messages from packages and save them in a message bundle template:
|
101 |
|
102 | fdt localization extract [<output>] [--paths <package1> [<package2> ...]]
|
103 |
|
104 | Merge multiple message bundles into a single bundle:
|
105 |
|
106 | fdt localization merge [<output>] --bundles <bundle1> <bundle2> [<bundle3> ...]
|
107 |
|
108 | Update message bundle with a new template bundle:
|
109 |
|
110 | fdt localization update <output> <bundle> [--output-to-stdout]
|
111 |
|
112 | Output 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 |
|
118 | Create 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 |
|
122 | Upgrade an instance of Fonto Editor:
|
123 |
|
124 | fdt editor upgrade [--version <version|'nightly'>] [--non-interactive]
|
125 |
|
126 | Add 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 |
|
130 | Start 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 |
|
134 | Create a build version of a Fonto Editor instance for production usage:
|
135 |
|
136 | fdt editor build [--no-mangle]
|
137 |
|
138 | Compile 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 |
|
144 | Initialize a Fonto Connectors instance in an empty or non-existent directory:
|
145 |
|
146 | fdt connectors init [--location <path>] --version <version>
|
147 |
|
148 | Run a Fonto Connectors instance with a self-signed certificate to test your configuration:
|
149 |
|
150 | fdt connectors run [--location <path>] [--config-location <path>]
|
151 |
|
152 | Build a Fonto Connectors docker image for production use:
|
153 |
|
154 | fdt connectors build [--location <path>] [--image-name <image-name>] [--image-tag <image-tag>]
|
155 |
|
156 | Upgrade an existing Fonto Connectors instance to the specified version:
|
157 |
|
158 | fdt connectors upgrade [--location <path>] --version <version>
|
159 |
|
160 | Download a self-contained build:
|
161 |
|
162 | fdt connectors download-self-contained --version <version> --runtime <runtime> [--location <path>]
|
163 |
|
164 | ### Content Quality
|
165 |
|
166 | Initialize a Fonto Content Quality instance in an empty or non-existent directory:
|
167 |
|
168 | fdt content-quality init [--location <path>] --version <version>
|
169 |
|
170 | Run a Fonto Content Quality instance to test your configuration:
|
171 |
|
172 | fdt content-quality run [--location <path>] [--config-location <path>] [--port]
|
173 |
|
174 | Build 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 |
|
178 | Upgrade an existing Fonto Content Quality instance to the specified version:
|
179 |
|
180 | fdt content-quality upgrade [--location <path>] --version <version>
|
181 |
|
182 | Download a self-contained build:
|
183 |
|
184 | fdt content-quality download-self-contained --version <version> --runtime <runtime> [--location <path>]
|
185 |
|
186 | ### Document History
|
187 |
|
188 | Download a self-contained build:
|
189 |
|
190 | fdt document-history download-self-contained --version <version> --runtime <runtime> [--location <path>]
|
191 |
|
192 | ### Review
|
193 |
|
194 | Download a self-contained build:
|
195 |
|
196 | fdt review download-self-contained --version <version> --runtime <runtime> [--location <path>]
|
197 |
|
198 | ### Schema Compiler
|
199 |
|
200 | Download a self-contained build:
|
201 |
|
202 | fdt schema-compiler download-self-contained --version <version> --runtime <runtime> [--location <path>]
|
203 |
|
204 | ### Spell Checker
|
205 |
|
206 | Download a self-contained build:
|
207 |
|
208 | fdt spell-checker download-self-contained --version <version> --runtime <runtime> [--location <path>]
|