Skip to content

Commit b8d4214

Browse files
authored
Merge pull request #111 from Syncano/docs/canary
Docs update to the current version
2 parents 8d8efab + 2d30f81 commit b8d4214

34 files changed

+3214
-457
lines changed

docs/cheatsheet/web/index.html

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<section data-tag="client" class="c-column">
4141
<h3>Setup</h3>
4242
<h4>Install</h4>
43-
<pre><code class="lang-bash">npm install syncano-client --save</code></pre>
43+
<pre><code class="lang-bash">npm install @syncano/client --save</code></pre>
4444
<p>or</p>
4545
<pre><code class="lang-html">&lt;script src="https://unpkg.com/syncano-client"&gt;&lt;/script&gt;</code></pre>
4646

@@ -107,7 +107,7 @@ <h4>Listen for changes on public channel</h4>
107107
<pre data-type="socket"><code class="lang-yaml">endpoints:
108108
messages:
109109
channel: messages</code></pre>
110-
<pre data-type="server"><code class="lang-js">import {channel} from 'syncano-server'
110+
<pre data-type="server"><code class="lang-js">import {channel} from '@syncano/core'
111111
channel.publish(`messages`, message)</code></pre>
112112
<pre><code class="lang-js">s.subscribe('chat/messages', res => {})</code></pre>
113113
<h4>Listen for changes on channel room</h4>
@@ -143,10 +143,10 @@ <h4>Unsubscribe from channel changes</h4>
143143
-->
144144
<h3>Setup</h3>
145145
<h4>Install</h4>
146-
<pre><code class="lang-bash">npm install syncano-server --save</code></pre>
146+
<pre><code class="lang-bash">npm install @syncano/core --save</code></pre>
147147

148148
<h4>Usage</h4>
149-
<pre><code class="lang-js">import Syncano from ‘syncano-server
149+
<pre><code class="lang-js">import Syncano from ‘@syncano/core
150150

151151
export default (ctx) => {
152152
const {data} = new Syncano(ctx)
@@ -458,121 +458,121 @@ <h4>Helper methods</h4>
458458
<section data-tag="cli" class="c-column">
459459
<h3>Basics</h3>
460460
<h4>Install</h4>
461-
<pre><code class="lang-bash">npm install --global yarn
462-
npm install -g syncano-cli</code></pre>
461+
<pre><code class="lang-bash">
462+
npm install @syncano/cli</code></pre>
463463
<div class="c-note">
464464
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#5c9fd6" d="M272 428v28c0 10.449-6.68 19.334-16 22.629V488c0 13.255-10.745 24-24 24h-80c-13.255 0-24-10.745-24-24v-9.371c-9.32-3.295-16-12.18-16-22.629v-28c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12zM128 176c0-35.29 28.71-64 64-64 8.837 0 16-7.164 16-16s-7.163-16-16-16c-52.935 0-96 43.065-96 96 0 8.836 7.164 16 16 16s16-7.164 16-16zm64-128c70.734 0 128 57.254 128 128 0 77.602-37.383 60.477-80.98 160h-94.04C101.318 236.33 64 253.869 64 176c0-70.735 57.254-128 128-128m0-48C94.805 0 16 78.803 16 176c0 101.731 51.697 91.541 90.516 192.674 3.55 9.249 12.47 15.326 22.376 15.326h126.215c9.906 0 18.826-6.078 22.376-15.326C316.303 267.541 368 277.731 368 176 368 78.803 289.195 0 192 0z"/></svg>
465465
<p>s is alias for syncano-cli</p>
466466
</div>
467467
<h4>Output usage information</h4>
468-
<pre><code class="lang-bash">s --help</code></pre>
468+
<pre><code class="lang-bash">npx s --help</code></pre>
469469
<h4>Output the version number</h4>
470-
<pre><code class="lang-bash">s --version</code></pre>
470+
<pre><code class="lang-bash">npx s --version</code></pre>
471471
<h4>Initiate project</h4>
472-
<pre><code class="lang-bash">s init
472+
<pre><code class="lang-bash">npx s init
473473

474474
# init with given instance nam
475475
s init -i <new_or_existing_instance></code></pre>
476476
<h4>Login to/register Syncano account</h4>
477-
<pre><code class="lang-bash">s login</code></pre>
477+
<pre><code class="lang-bash">npx s login</code></pre>
478478
<h4>Logout (delete account keys from this computer)</h4>
479-
<pre><code class="lang-bash">s logout</code></pre>
479+
<pre><code class="lang-bash">npx s logout</code></pre>
480480
<h4>Attach project to the chosen Instance</h4>
481-
<pre><code class="lang-bash">s attach --instance my_instance_name</code></pre>
481+
<pre><code class="lang-bash">npx s attach --instance my_instance_name</code></pre>
482482

483483
<h3>Deploy</h3>
484484

485485
<h4>Deploy whole project</h4>
486-
<pre><code class="lang-bash">s deploy</code></pre>
486+
<pre><code class="lang-bash">npx s deploy</code></pre>
487487

488488
<h4>Deploy whole project (with instance creation)</h4>
489489
<pre><code class="lang-bash">s deploy --create-instance &lt;new instance name&gt;</code></pre>
490490

491491
<h4>Deploy whole project</h4>
492-
<pre><code class="lang-bash">s deploy &lt;socket name&gt;</code></pre>
492+
<pre><code class="lang-bash">npx s deploy &lt;socket name&gt;</code></pre>
493493

494494
<h4>🔥 Hot deploy (deploy every change in the source code right away)</h4>
495-
<pre><code class="lang-bash">s hot </code></pre>
495+
<pre><code class="lang-bash">npx s hot </code></pre>
496496

497497
<h4>🔥 Hot deploy chooses Socket</h4>
498-
<pre><code class="lang-bash">s hot &lt;socket name&gt;</code></pre>
498+
<pre><code class="lang-bash">npx s hot &lt;socket name&gt;</code></pre>
499499

500500
<h4>Call Socket endpoint:</h4>
501-
<pre><code class="lang-bash">s call &lt;socket name&gt;/&lt;endpoint&gt;</code></pre>
501+
<pre><code class="lang-bash">npx s call &lt;socket name&gt;/&lt;endpoint&gt;</code></pre>
502502
</section>
503503
<section data-tag="cli" class="c-column">
504504
<h3>Traces</h3>
505505

506506
<h4>Trace all Socket calls</h4>
507-
<pre><code class="lang-bash">s trace</code></pre>
507+
<pre><code class="lang-bash">npx s trace</code></pre>
508508

509509
<h4>Trace chosen Socket calls</h4>
510-
<pre><code class="lang-bash">s trace &lt;socket name&gt;</code></pre>
510+
<pre><code class="lang-bash">npx s trace &lt;socket name&gt;</code></pre>
511511

512512
<h3>Sockets</h3>
513513

514514
<h4>List Sockets</h4>
515-
<pre><code class="lang-bash">s list</code></pre>
515+
<pre><code class="lang-bash">npx s list</code></pre>
516516

517517
<h4>Socket details</h4>
518-
<pre><code class="lang-bash">s list &lt;socket name&gt;</code></pre>
518+
<pre><code class="lang-bash">npx s list &lt;socket name&gt;</code></pre>
519519

520520
<h4>Adding socket from the Sockets Registry (last version)</h4>
521-
<pre><code class="lang-bash">s add &lt;socket name&gt;</code></pre>
521+
<pre><code class="lang-bash">npx s add &lt;socket name&gt;</code></pre>
522522

523523
<h4>Remove Socket</h4>
524-
<pre><code class="lang-bash">s remove &lt;socket name&gt;</code></pre>
524+
<pre><code class="lang-bash">npx s remove &lt;socket name&gt;</code></pre>
525525

526526
<h4>Create new Socket</h4>
527-
<pre><code class="lang-bash">s create &lt;socket name&gt;</code></pre>
527+
<pre><code class="lang-bash">npx s create &lt;socket name&gt;</code></pre>
528528

529529
<h4>Full configuration of given Socket</h4>
530530

531531
<pre data-type="socket"><code class="lang-yaml">config:
532532
API_KEY:
533533
description: Slack API key</code></pre>
534-
<pre><code class="lang-bash">s config &lt;socket name&gt;</code></pre>
534+
<pre><code class="lang-bash">npx s config &lt;socket name&gt;</code></pre>
535535

536536
<h4>Show configuration of given socket</h4>
537-
<pre><code class="lang-bash">s config-show &lt;socket name&gt;</code></pre>
537+
<pre><code class="lang-bash">npx s config-show &lt;socket name&gt;</code></pre>
538538

539539
<h4>Change single configuration option</h4>
540-
<pre><code class="lang-bash">s config-set &lt;socket name&gt; &lt;option name&gt; &lt;value&gt;</code></pre>
540+
<pre><code class="lang-bash">npx s config-set &lt;socket name&gt; &lt;option name&gt; &lt;value&gt;</code></pre>
541541
</section>
542542
<section data-tag="cli" class="c-column">
543543
<h3>Registry</h3>
544544

545545
<h4>Search for Sockets</h4>
546-
<pre><code class="lang-bash">s search &lt;keyword&gt;</code></pre>
546+
<pre><code class="lang-bash">npx s search &lt;keyword&gt;</code></pre>
547547

548548
<h4>Submit your Socket to the registry</h4>
549-
<pre><code class="lang-bash">s submit &lt;socket name&gt;
549+
<pre><code class="lang-bash">npx s submit &lt;socket name&gt;
550550

551551
# bump version of the Socket (e.g. major, minor, patch)
552552
s submit &lt;socket name&gt; -b patch</code></pre>
553553

554554
<h4>Make you private Socket public</h4>
555-
<pre><code class="lang-bash">s publish &lt;socket name&gt;</code></pre>
555+
<pre><code class="lang-bash">npx s publish &lt;socket name&gt;</code></pre>
556556

557557
<h3>Hosting</h3>
558558

559559
<h4>Add new hosting</h4>
560-
<pre><code class="lang-bash">s hosting add &lt;local path&gt;</code></pre>
560+
<pre><code class="lang-bash">npx s hosting add &lt;local path&gt;</code></pre>
561561

562562
<h4>Delete hosting</h4>
563-
<pre><code class="lang-bash">s hosting delete &lt;hosting name&gt;</code></pre>
563+
<pre><code class="lang-bash">npx s hosting delete &lt;hosting name&gt;</code></pre>
564564

565565
<h4>List all hostinngs</h4>
566-
<pre><code class="lang-bash">s hosting list</code></pre>
566+
<pre><code class="lang-bash">npx s hosting list</code></pre>
567567

568568
<h4>List files of given hosting</h4>
569-
<pre><code class="lang-bash">s hosting files &lt;hosting name&gt;</code></pre>
569+
<pre><code class="lang-bash">npx s hosting files &lt;hosting name&gt;</code></pre>
570570

571571
<h4>Synchronize files of given hosting</h4>
572-
<pre><code class="lang-bash">s hosting sync &lt;hosting name&gt;</code></pre>
572+
<pre><code class="lang-bash">npx s hosting sync &lt;hosting name&gt;</code></pre>
573573

574574
<h4>Configure hosting options</h4>
575-
<pre><code class="lang-bash">s hosting config &lt;hosting name&gt; --cname &lt;domain name&gt;
575+
<pre><code class="lang-bash">npx s hosting config &lt;hosting name&gt; --cname &lt;domain name&gt;
576576
s hosting config &lt;hosting name&gt; --remove-cname &lt;domain name&gt;</code></pre>
577577
</section>
578578
<!--
@@ -582,7 +582,7 @@ <h4>Configure hosting options</h4>
582582
--><section data-tag="socket" class="c-column">
583583
<h3>Basics</h3>
584584
<h4>Create socket</h4>
585-
<pre><code class="lang-bash">syncano-cli create &lt;socket-name&gt;
585+
<pre><code class="lang-bash">npx syncano-cli create &lt;socket-name&gt;
586586
# This will create socket configuration at:
587587
# ./syncano/socket-name/socket.yml</code></pre>
588588
<h4>Basic definition</h4>

0 commit comments

Comments
 (0)