UNPKG

backed-cli

Version:

The official command line interface for Backed

197 lines (182 loc) 8.66 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl"> <title data-ice="title">API Document</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> </head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <a data-ice="repoURL" href="https://github.com/VandeurenGlenn/backed-cli" class="repo-url-github">Repository</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> </header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/config.js~Config.html">Config</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/server.js~Server.html">Server</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/watcher.js~Watcher.html">Watcher</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-server">server</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-watcher">watcher</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><div data-ice="index" class="github-markdown"><h1 id="backed-cli-npm-version-npm-image-npm-url-build-status-travis-image-travis-url-dependency-status-daviddm-image-daviddm-url-coverage-percentage-coveralls-image-coveralls-url-">backed-cli <a href="https://npmjs.org/package/backed-cli"><img src="https://badge.fury.io/js/backed-cli.svg" alt="NPM version"></a> <a href="https://travis-ci.org/VandeurenGlenn/backed-cli"><img src="https://travis-ci.org/VandeurenGlenn/backed-cli.svg?branch=master" alt="Build Status"></a> <a href="https://david-dm.org/VandeurenGlenn/backed-cli"><img src="https://david-dm.org/VandeurenGlenn/backed-cli.svg?theme=shields.io" alt="Dependency Status"></a> <a href="https://coveralls.io/r/VandeurenGlenn/backed-cli"><img src="https://coveralls.io/repos/VandeurenGlenn/backed-cli/badge.svg" alt="Coverage percentage"></a></h1> <blockquote> <p>A command line interface for fast es6 development</p> </blockquote> <h2 id="installation">Installation</h2> <pre><code class="lang-sh"><code class="source-code prettyprint">$ npm install --global backed-cli</code> </code></pre> <h2 id="usage">Usage</h2> <ul> <li>Create a &apos;backed.json&apos; file in your projects root <a href="https://github.com/vandeurenglenn/backed-cli/config/backed.json">example</a></li> </ul> <h3 id="commands">Commands</h3> <h4 id="build-build-b-">Build[--build, -b]</h4> <p>Bundle your app/component</p> <pre><code class="lang-sh"><code class="source-code prettyprint"> backed --build</code> </code></pre> <h4 id="copy-copy-c-">Copy[--copy, -c]</h4> <p>Copy resources</p> <pre><code class="lang-sh"><code class="source-code prettyprint"> backed --copy</code> </code></pre> <h4 id="serve-serve-s-">Serve[--serve, -s]</h4> <p>Serve a localhost for your app/component</p> <pre><code class="lang-sh"><code class="source-code prettyprint"> backed --serve</code> </code></pre> <h4 id="watch-watch-w-">Watch[--watch, -w]</h4> <p>Watch for file changes, rebuilds &amp; reloads the app/component on change</p> <pre><code class="lang-sh"><code class="source-code prettyprint"> backed --watch</code> </code></pre> <h2 id="api">API</h2> <h3 id="backed-options-">backed[{options}]</h3> <h4 id="options">options</h4> <h4 id="bundles">bundles</h4> <p>Type: <code>array</code><br> Default: <code>undefined</code><br> Options: <code>src, dest, format, babel</code></p> <p>An array of objects with each object containing a src &amp; dest property</p> <pre><code class="lang-json"><code class="source-code prettyprint">// minimal { &quot;bundles&quot;: [{ &quot;src&quot;: &quot;some/path/to/index&quot;, &quot;dest&quot;: &quot;some/path/to/index&quot; }] } // minimal with multiple bundles { &quot;bundles&quot;: [{ &quot;src&quot;: &quot;some/path/to/index&quot;, &quot;dest&quot;: &quot;some/path/to/index&quot; }, { &quot;src&quot;: &quot;some/other/path/to/element&quot;, &quot;dest&quot;: &quot;some/other/path/to/element&quot; }] } // all options { &quot;bundles&quot;: [{ &quot;src&quot;: &quot;some/path/to/index&quot;, &quot;dest&quot;: &quot;some/path/to/index&quot;, &quot;format&quot;: &quot;iife&quot; }, { &quot;src&quot;: &quot;some/other/path/to/element&quot;, &quot;dest&quot;: &quot;some/other/path/to/element&quot;, &quot;format&quot;: [&quot;iife&quot;, &quot;es&quot;], &quot;babel&quot;: {&quot;babel-config&quot;} }] }</code> </code></pre> <h4 id="format">format</h4> <p>Type: <code>array</code><br> Default: <code>iife</code><br> Options: <code>iife, es, cjs, amd</code></p> <p>The format to build.</p> <p><strong><em> TODO: deprecate </em></strong></p> <pre><code class="lang-json"><code class="source-code prettyprint">{ &quot;format&quot;: &quot;es&quot; } // multiple { &quot;format&quot;: [&quot;iife&quot;, &quot;es&quot;] }</code> </code></pre> <h4 id="watch-options-">watch[{options}]</h4> <p>Type: <code>array</code><br> Default: <code>./src</code><br> Options: <code>src, options</code><br></p> <p>options can be any <a href="https://github.com/paulmillr/chokidar">chokidar</a> option.</p> <pre><code class="lang-json"><code class="source-code prettyprint">{ &quot;watch&quot;: { &quot;src&quot;: [&quot;./src&quot;], &quot;options&quot;: {} } }</code> </code></pre> <h4 id="server-documentation-not-finished-check-backed-json-https-github-com-vandeurenglenn-backed-cli-blob-master-config-backed-json-or-when-using-next-next-backed-json-https-github-com-vandeurenglenn-backed-cli-blob-master-config-next-backed-json-">server (documentation not finished check <a href="https://github.com/VandeurenGlenn/backed-cli/blob/master/config/backed.json">backed.json</a> or when using next <a href="https://github.com/VandeurenGlenn/backed-cli/blob/master/config/next-backed.json">next-backed.json</a>)</h4> <p>Type: <code>object</code><br> Default: <code>undefined</code><br> Options: <code>demo, use, docs</code></p> <p>Serve your component/app documentation &amp; demo</p> <h2 id="todo">TODO</h2> <ul> <li>[ ] Add more documentation &amp; examples</li> <li>[ ] Add support for plugins <code>example:</code> <br><ul> <li>backed-plugin-todo <br></li> <li>backed-plugin-atom <br></li> <li>...</li> </ul> </li> <li>[ ] Add support for presets <code>example:</code> <br><ul> <li>backed-preset-element <br></li> <li>backed-preset-app <br></li> <li>backed-preset-atom <br></li> <li>...</li> </ul> </li> <li>[ ] Serve app after build &amp; copy</li> <li>[ ] Handle errors</li> <li>[ ] Run tests with <a href="https://travis-ci.org/">Travis CI</a> &amp; <a href="https://saucelabs.com/">SAUCELABS</a></li> </ul> <h2 id="projects-using-backed-cli">Projects using Backed CLI</h2> <h3 id="components">components</h3> <ul> <li><a href="https://github.com/VandeurenGlenn/custom-marked">custom-marked</a></li> </ul> <h3 id="frameworks">frameworks</h3> <ul> <li><a href="https://github.com/VandeurenGlenn/backed">Backed</a> - Small web framework for quick app &amp; component development</li> </ul> <h2 id="organizations-using-backed-cli">Organizations using Backed CLI</h2> <ul> <li><a href="https://github.com/reeflight">reeflight</a></li> </ul> <h2 id="license">License</h2> <p>MIT &#xA9; <a href="">Glenn Vandeuren</a></p> </div> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>