You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66-42Lines changed: 66 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,104 +20,128 @@ It can be used to easily integrate Jevko formats into applications that deal wit
20
20
21
21
<!-- In the future, JevkoML could also be used directly by various tools, for increased efficiency. -->
22
22
23
-
## Usage
23
+
## Installation
24
24
25
-
If Jevko CLI is [installed](#installation-with-deno) you can invoke it as:
25
+
These instructions will guide you through installing Deno and then using it to install `jevko` as a command in your system, so that you can invoke it from anywhere.
26
+
27
+
### Install Deno
28
+
29
+
Jevko CLI has one dependency: [Deno](https://deno.land/).
30
+
31
+
Fortunately Deno is very nice and [easy to install](https://deno.land/[email protected]/getting_started/installation). Deno is distributed as a single binary executable with no external dependencies.
32
+
33
+
This command will run Deno's official installation script on Linux or macOS:
26
34
27
35
```
28
-
jevko
36
+
curl -fsSL https://deno.land/x/install/install.sh | sh
29
37
```
30
38
31
-
Without arguments, `jevko`will accept input from standard input until you press CTRL+D.
39
+
This one will do the same on Windows, if PowerShell is available:
32
40
33
-
<!-- todo?: mvp console highlighting? -->
41
+
```
42
+
irm https://deno.land/install.ps1 | iex
43
+
```
34
44
35
-
You can also provide a path to a file as an argument:
45
+
For more installation options or if you run into any problems, see the official instructions on [deno.land](https://deno.land/[email protected]/getting_started/installation) and on [denoland GitHub](https://github.com/denoland/deno_install).
36
46
37
-
<!-- get syntax highlighting for vscode -->
47
+
### Install Jevko CLI with Deno
48
+
49
+
If you have [Deno installed](#install-deno) and Deno's installation root's bin directory (something like `/home/USER/.deno/bin`) [added to `PATH`](#tip-get-a-list-of-directories-in-your-path) then you can use the following command to install `jevko` directly from GitHub master branch:
Or you can put an `/output` directive with the output file name at the top of the input file:
63
+
See the [Jevko CLI GitHub Releases](https://github.com/jevko/jevko-cli/releases) for a list of available versions.
64
+
65
+
### Alternative: install without editing PATH
66
+
67
+
If you can't or prefer not to change your `PATH`, you can alternatively install `jevko` to a [directory that is already in the `PATH`](#tip-get-a-list-of-directories-in-your-path), by adding the `--root` option to `deno install`. E.g. if your `PATH` contains `~/.local/bin`, then you can run:
You can get a list of directories in your `PATH` by running:
58
78
59
79
```
60
-
jevko filename.jevkoml
80
+
echo $PATH
61
81
```
62
82
63
-
it will output to `outputfile.html` instead of standard output.
64
-
65
-
By default, Jevko CLI infers the Jevko format of the input file by extension. You can also specify the format by putting the `/jevko` directive at the top of the input file:
Jevko CLI has one dependency: [Deno](https://deno.land/).
91
+
If Jevko CLI is [installed](#installation-with-deno) you can invoke it as:
74
92
75
-
Fortunately Deno is very nice and [easy to install](https://deno.land/[email protected]/getting_started/installation).
93
+
```
94
+
jevko
95
+
```
76
96
77
-
<!-- I recommend installing it, as it makes installing and managing `jevko` easy and efficient. -->
97
+
Without arguments, `jevko` will accept input from standard input until you press CTRL+D.
78
98
79
-
## Installation with Deno
99
+
<!-- todo?: mvp console highlighting? -->
80
100
81
-
These instructions will guide you through using Deno to install `jevko` as a command in your system, so that you can invoke it from anywhere.
101
+
You can also provide a path to a file as an argument:
82
102
83
-
If you have [Deno installed](#dependencies) and Deno's installation root's bin directory (something like `/home/USER/.deno/bin`) [added to `PATH`](#tip-get-a-list-of-directories-in-your-path) then you can use the following command to install `jevko` directly from GitHub master branch:
Or you can put an `output` directive with the output file name at the top of the input file:
98
118
99
-
If you can't or prefer not to change your `PATH`, you can alternatively install `jevko` to a [directory that is already in the `PATH`](#tip-get-a-list-of-directories-in-your-path), by adding the `--root` option to `deno install`. E.g. if your `PATH` contains `~/.local/bin`, then you can run:
119
+
<!-- todo: describe the new way of doing directives -- probly change name of directives to sth else -->
You can get a list of directories in your `PATH` by running:
127
+
now if you run:
110
128
111
129
```
112
-
echo $PATH
130
+
jevko filename.jevkoml
113
131
```
114
132
115
-
This should print something like:
133
+
it will output to `outputfile.html` instead of standard output.
134
+
135
+
By default, Jevko CLI infers the Jevko format of the input file by extension. You can also specify the format by putting the `format` directive at the top of the input file:
// const main = await import('https://raw.githubusercontent.com/jevko/jevko-cli/v0.2.0/main.js')
59
29
60
-
// top-level directives
61
-
//?todo: perhaps stop reading when trimmed.startsWith('/') === false (i.e., they must all appear at the very top to be valid; otoh should allow hashbang, so perhaps sth like breakPrefix should be utilized)
62
-
if(trimmed.startsWith('/')){
63
-
constdirective=trimmed.slice(1).trim()
64
-
// todo: maybe support import & paste here as well
0 commit comments