Skip to content

Commit 49e4165

Browse files
committed
docs!: improve readme
1 parent 8e62917 commit 49e4165

File tree

9 files changed

+80
-48
lines changed

9 files changed

+80
-48
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ Let's start with a dead simple example. We want to send "Hello world" to
3434
</template>
3535
3636
<script>
37-
import VueCommand, { createStdout } from "vue-command";
38-
import "vue-command/dist/vue-command.css";
37+
import VueCommand, { createStdout } from "vue-command"
38+
import "vue-command/dist/vue-command.css"
3939
4040
export default {
4141
components: {
42-
VueCommand,
42+
VueCommand
4343
},
4444
4545
data: () => ({
4646
commands: {
47-
"hello-world": () => createStdout("Hello world"),
48-
},
49-
}),
50-
};
47+
"hello-world": () => createStdout("Hello world")
48+
}
49+
})
50+
}
5151
</script>
5252
```
5353

@@ -74,13 +74,13 @@ export default {
7474
inject: ["exit", "setFullscreen", "terminal"],
7575
7676
created() {
77-
this.setFullscreen(true);
77+
this.setFullscreen(true)
7878
},
7979
8080
mounted() {
81-
this.$refs.nano.focus();
82-
},
83-
};
81+
this.$refs.nano.focus()
82+
}
83+
}
8484
</script>
8585
8686
<style scoped>
@@ -99,9 +99,9 @@ Now the command has to return the component.
9999
</template>
100100
101101
<script>
102-
import VueCommand from "vue-command";
103-
import "vue-command/dist/vue-command.css";
104-
import NanoEditor from "@/components/NanoEditor.vue";
102+
import VueCommand from "vue-command"
103+
import "vue-command/dist/vue-command.css"
104+
import NanoEditor from "@/components/NanoEditor.vue"
105105
106106
export default {
107107
components: {
@@ -111,9 +111,9 @@ export default {
111111
data: () => ({
112112
commands: {
113113
nano: () => NanoEditor,
114-
},
115-
}),
116-
};
114+
}
115+
})
116+
}
117117
</script>
118118
```
119119

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="favicon.ico"><![endif]--><title>vue-command</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"><link href="css/app.85170694.css" rel="preload" as="style"><link href="js/app.41d56363.js" rel="preload" as="script"><link href="js/chunk-vendors.37e4d34f.js" rel="preload" as="script"><link href="css/app.85170694.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="vue-command"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but vue-command doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.37e4d34f.js"></script><script src="js/app.41d56363.js"></script></body></html>
1+
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="favicon.ico"><![endif]--><title>vue-command</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"><link href="css/app.85170694.css" rel="preload" as="style"><link href="js/app.6128f5a3.js" rel="preload" as="script"><link href="js/chunk-vendors.37e4d34f.js" rel="preload" as="script"><link href="css/app.85170694.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png"><link rel="manifest" href="manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="vue-command"><link rel="apple-touch-icon" href="img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but vue-command doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.37e4d34f.js"></script><script src="js/app.6128f5a3.js"></script></body></html>

docs/js/app.41d56363.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/js/app.41d56363.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/js/app.6128f5a3.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/app.6128f5a3.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/precache-manifest.e98993925c40daebf7a005789d2a1999.js renamed to docs/precache-manifest.8447f70ffda560461010d0256f0c08d6.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
self.__precacheManifest = (self.__precacheManifest || []).concat([
22
{
3-
"revision": "bcad62c95eeb0dd6c325",
3+
"revision": "b7d58fccea516ac1a6cc",
44
"url": "css/app.85170694.css"
55
},
66
{
7-
"revision": "ac86eab1b26afc86668b35d02f57798b",
7+
"revision": "4576e67933e04f70d7c8024e483aabf7",
88
"url": "index.html"
99
},
1010
{
11-
"revision": "bcad62c95eeb0dd6c325",
12-
"url": "js/app.41d56363.js"
11+
"revision": "b7d58fccea516ac1a6cc",
12+
"url": "js/app.6128f5a3.js"
1313
},
1414
{
1515
"revision": "3554254d8a3563496f24",

docs/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
1515

1616
importScripts(
17-
"precache-manifest.e98993925c40daebf7a005789d2a1999.js"
17+
"precache-manifest.8447f70ffda560461010d0256f0c08d6.js"
1818
);
1919

2020
workbox.core.setCacheNameDetails({prefix: "vue-command"});

src/hosted/App.vue

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="container">
55
<h1>vue-command</h1>
66
<p class="lead">
7-
A fully working, most feature-rich Vue.js terminal emulator. Now with Vue.js 3 support! <a
7+
A fully working, most feature-rich Vue.js terminal emulator. <a
88
href="https://github.com/ndabAP/vue-command">Github</a>
99
</p>
1010

@@ -47,31 +47,41 @@
4747
</thead>
4848
<tbody>
4949
<tr>
50-
<td><pre><code>cursor-position</code></pre></td>
50+
<td>
51+
<pre><code>cursor-position</code></pre>
52+
</td>
5153
<td>
5254
<pre><code>{{ cursorPosition }}</code></pre>
5355
</td>
5456
</tr>
5557
<tr>
56-
<td><pre><code>dispatched-queries</code></pre></td>
58+
<td>
59+
<pre><code>dispatched-queries</code></pre>
60+
</td>
5761
<td>
5862
<pre><code>{{ dispatchedQueries }}</code></pre>
5963
</td>
6064
</tr>
6165
<tr>
62-
<td><pre><code>help-text</code></pre></td>
66+
<td>
67+
<pre><code>help-text</code></pre>
68+
</td>
6369
<td>
6470
<pre><code>{{ helpText }}</code></pre>
6571
</td>
6672
</tr>
6773
<tr>
68-
<td><pre><code>help-timeout</code></pre></td>
74+
<td>
75+
<pre><code>help-timeout</code></pre>
76+
</td>
6977
<td>
7078
<pre><code>{{ helpTimeout }}</code></pre>
7179
</td>
7280
</tr>
7381
<tr>
74-
<td><pre><code>hide-bar</code></pre></td>
82+
<td>
83+
<pre><code>hide-bar</code></pre>
84+
</td>
7585
<td>
7686
<input
7787
v-model="hideBar"
@@ -81,7 +91,9 @@
8191
</td>
8292
</tr>
8393
<tr>
84-
<td><pre><code>hide-buttons</code></pre></td>
94+
<td>
95+
<pre><code>hide-buttons</code></pre>
96+
</td>
8597
<td>
8698
<input
8799
v-model="hideButtons"
@@ -91,13 +103,17 @@
91103
</td>
92104
</tr>
93105
<tr>
94-
<td><pre><code>hide-prompt</code></pre></td>
106+
<td>
107+
<pre><code>hide-prompt</code></pre>
108+
</td>
95109
<td>
96110
<pre><code>{{ hidePrompt }}</code></pre>
97111
</td>
98112
</tr>
99113
<tr>
100-
<td><pre><code>hide-title</code></pre></td>
114+
<td>
115+
<pre><code>hide-title</code></pre>
116+
</td>
101117
<td>
102118
<input
103119
v-model="hideTitle"
@@ -107,25 +123,33 @@
107123
</td>
108124
</tr>
109125
<tr>
110-
<td><pre><code>help-timeout</code></pre></td>
126+
<td>
127+
<pre><code>help-timeout</code></pre>
128+
</td>
111129
<td>
112130
<pre><code>{{ helpTimeout }}</code></pre>
113131
</td>
114132
</tr>
115133
<tr>
116-
<td><pre><code>history</code></pre></td>
134+
<td>
135+
<pre><code>history</code></pre>
136+
</td>
117137
<td>
118138
<pre><code>{{ history }}</code></pre>
119139
</td>
120140
</tr>
121141
<tr>
122-
<td><pre><code>history-position</code></pre></td>
142+
<td>
143+
<pre><code>history-position</code></pre>
144+
</td>
123145
<td>
124146
<pre><code>{{ historyPosition }}</code></pre>
125147
</td>
126148
</tr>
127149
<tr>
128-
<td><pre><code>invert</code></pre></td>
150+
<td>
151+
<pre><code>invert</code></pre>
152+
</td>
129153
<td>
130154
<input
131155
v-model="invert"
@@ -135,25 +159,33 @@
135159
</td>
136160
</tr>
137161
<tr>
138-
<td><pre><code>is-fullscreen</code></pre></td>
162+
<td>
163+
<pre><code>is-fullscreen</code></pre>
164+
</td>
139165
<td>
140166
<pre><code>{{ isFullscreen }}</code></pre>
141167
</td>
142168
</tr>
143169
<tr>
144-
<td><pre><code>prompt</code></pre></td>
170+
<td>
171+
<pre><code>prompt</code></pre>
172+
</td>
145173
<td>
146174
<pre><code>{{ prompt }}</code></pre>
147175
</td>
148176
</tr>
149177
<tr>
150-
<td><pre><code>query</code></pre></td>
178+
<td>
179+
<pre><code>query</code></pre>
180+
</td>
151181
<td>
152182
<pre><code>{{ query }}</code></pre>
153183
</td>
154184
</tr>
155185
<tr>
156-
<td><pre><code>title</code></pre></td>
186+
<td>
187+
<pre><code>title</code></pre>
188+
</td>
157189
<td>
158190
<pre><code>{{ title }}</code></pre>
159191
</td>
@@ -167,18 +199,18 @@
167199
</template>
168200

169201
<script lang="js">
170-
import { ref } from 'vue'
171202
import VueCommand from '@/components/VueCommand'
203+
import ChuckNorris from '@/hosted/ChuckNorris.vue'
204+
import NanoEditor from '@/hosted/NanoEditor.vue'
172205
import {
206+
createQuery,
173207
createStderr,
174208
createStdout,
175-
createQuery,
176209
listFormatter,
177210
newDefaultHistory,
178211
tableFormatter
179212
} from '@/library'
180-
import NanoEditor from '@/hosted/NanoEditor.vue'
181-
import ChuckNorris from '@/hosted/ChuckNorris.vue'
213+
import { ref } from 'vue'
182214
183215
const PROMPT = 'neil@moon~$'
184216
@@ -241,7 +273,7 @@ export default {
241273
prompt.value = `${PROMPT}/home`
242274
}
243275
if ((lastArgument === '../' || lastArgument === '..') &&
244-
prompt.value === `${PROMPT}/home`) {
276+
prompt.value === `${PROMPT}/home`) {
245277
prompt.value = `${PROMPT}`
246278
}
247279
if (lastArgument !== 'home' && lastArgument !== '../' && lastArgument !== '..') {

0 commit comments

Comments
 (0)