<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<title>Dynamic Engine Command-line-interface (CLI) Reference</title>
<link type="text/css" rel="stylesheet" href="../assets/css/github-markdown.css">
<link type="text/css" rel="stylesheet" href="../assets/css/pilcrow.css">
<link type="text/css" rel="stylesheet" href="../assets/css/hljs-github.min.css"/>
</head>
<body>
<article class="markdown-body"><h1 id="dynamic-engine-command-line-interface-(cli)-reference"><a class="header-link" href="#dynamic-engine-command-line-interface-(cli)-reference"></a>Dynamic Engine Command-line-interface (CLI) Reference</h1>
<p>Dynamic Engine Command-line-interface runs on <a href="http://nodejs.org/" title="Node.js">Node.js</a> and is available on <a href="https://npmjs.org/package/cordova" title="NPM">NPM</a>.</p>
<h2 id="how-to-install"><a class="header-link" href="#how-to-install"></a>How to install</h2>
<pre class="hljs"><code>npm install -g git+https:<span class="hljs-regexp">//gi</span>tlab.vipera.com<span class="hljs-regexp">/dynamic-engine/</span>de-cli.git</code></pre><p>Or through the offical Vipera NPM repository</p>
<pre class="hljs"><code><span class="hljs-built_in">npm</span> set registry https:<span class="hljs-regexp">//</span><span class="hljs-built_in">npm</span>-proxy.fury.io<span class="hljs-regexp">/Mr43aEGkxz47vyf7VZ_y/vipera-npm-registry/</span>
<span class="hljs-built_in">npm</span> install -g vipera-de-cli</code></pre><h2 id="syntax"><a class="header-link" href="#syntax"></a>Syntax</h2>
<pre class="hljs"><code>de-cli <<span class="hljs-built_in">command</span>> [options]</code></pre><h2 id="global-command-list"><a class="header-link" href="#global-command-list"></a>Global Command List</h2>
<p>These commands are available at all times.</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>buildAssets</td>
<td>Build encrypted assets into the platform folder</td>
</tr>
<tr>
<td>buildAssetsBundle</td>
<td>Build the encrypted Asset Bundle ready for the MOTIF Assets Update</td>
</tr>
</tbody>
</table>
<h2 id="de-cli-buildassets-command"><a class="header-link" href="#de-cli-buildassets-command"></a>de-cli buildAssets command</h2>
<h3 id="synopsis"><a class="header-link" href="#synopsis"></a>Synopsis</h3>
<p>Build the encrypted assets bundle into the platform folder.</p>
<h3 id="syntax-1"><a class="header-link" href="#syntax-1"></a>Syntax</h3>
<pre class="hljs"><code><span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span> --buildAssets [options]</code></pre><h3 id="options"><a class="header-link" href="#options"></a>Options</h3>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>--version</td>
<td>The bundle version.</td>
</tr>
<tr>
<td>--config</td>
<td>the build bundle configuration file</td>
</tr>
</tbody>
</table>
<p>The build configuration file
The file contains a json definition of the build properties.
Example:</p>
<pre class="hljs"><code> {
<span class="hljs-attr">"outputFolder"</span> : <span class="hljs-string">"./output"</span>,
<span class="hljs-attr">"encryptAssets"</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">"version"</span> : <span class="hljs-string">"1.0.1"</span>,
<span class="hljs-attr">"encryptionKey"</span> : <span class="hljs-string">"aasdfghjklpoiuyt"</span>,
<span class="hljs-attr">"encryptionIV"</span> : <span class="hljs-string">"1q2w3e4r5t6y7u8i"</span>
}</code></pre><table>
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>encryptionKey</td>
<td>the key used to encrypt assets (16 length chars string)</td>
</tr>
<tr>
<td>encryptionIV</td>
<td>the IV spec used to encrypt assets (16 length chars string)</td>
</tr>
</tbody>
</table>
<h2 id="example"><a class="header-link" href="#example"></a>Example</h2>
<pre class="hljs"><code> <span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span> --buildAssets --config ./<span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span>.config.json</code></pre><h2 id="de-cli-buildassetsbundle-command"><a class="header-link" href="#de-cli-buildassetsbundle-command"></a>de-cli buildAssetsBundle command</h2>
<h3 id="synopsis-1"><a class="header-link" href="#synopsis-1"></a>Synopsis</h3>
<p>Build the encrypted assets bundle package for MOTIF Assets Update .</p>
<h3 id="syntax-2"><a class="header-link" href="#syntax-2"></a>Syntax</h3>
<pre class="hljs"><code><span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span> --buildAssetsBundle [options]</code></pre><h3 id="options-1"><a class="header-link" href="#options-1"></a>Options</h3>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>--version</td>
<td>The bundle version.</td>
</tr>
<tr>
<td>--config</td>
<td>the build bundle configuration file</td>
</tr>
<tr>
<td>--outputFolder</td>
<td>The folder where will be placed the bundle produced</td>
</tr>
</tbody>
</table>
<p>The build configuration file
The file contains a json definition of the build properties.
Example:</p>
<pre class="hljs"><code>{
<span class="hljs-attr">"outputFolder"</span> : <span class="hljs-string">"./output"</span>,
<span class="hljs-attr">"encryptAssets"</span>: <span class="hljs-literal">true</span>,
<span class="hljs-attr">"version"</span> : <span class="hljs-string">"1.0.1"</span>,
<span class="hljs-attr">"encryptionKey"</span> : <span class="hljs-string">"aasdfghjklpoiuyt"</span>,
<span class="hljs-attr">"encryptionIV"</span> : <span class="hljs-string">"1q2w3e4r5t6y7u8i"</span>,
<span class="hljs-attr">"assetsName"</span> : {
<span class="hljs-attr">"ios"</span> : <span class="hljs-string">"detestbed_ios"</span>,
<span class="hljs-attr">"android"</span> : <span class="hljs-string">"detestbed_android"</span>
}
}</code></pre><table>
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>encryptionKey</td>
<td>the key used to encrypt assets (16 length chars string)</td>
</tr>
<tr>
<td>encryptionIV</td>
<td>the IV spec used to encrypt assets (16 length chars string)</td>
</tr>
<tr>
<td>assetsName.ios</td>
<td>the assets name for the ios package (refer to MOTIF Asset Update functionality)</td>
</tr>
<tr>
<td>assetsName.android</td>
<td>the assets name for the android package (refer to MOTIF Asset Update functionality)</td>
</tr>
</tbody>
</table>
<h2 id="example-1"><a class="header-link" href="#example-1"></a>Example</h2>
<pre class="hljs"><code><span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span> buildAssetsBundle --config ./<span class="hljs-keyword">de</span>-<span class="hljs-keyword">cli</span>.config.json</code></pre> </article>
</body>
</html>