Skip to content

Commit 247036f

Browse files
chore: add usage to readme
Co-authored-by: Maxime Mangel <[email protected]>
1 parent 4d81edf commit 247036f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,52 @@
22

33
This is a compiler from `.d.ts` to F# bindings for [Fable](https://fable.io/).
44

5+
## Getting Started
6+
7+
Glutinum is delivered both as a CLI tool and web interface.
8+
9+
### Web Interface
10+
11+
The web interface is available [here](https://glutinum.net/).
12+
13+
It is a simple and easy-to-use tool, allowing you to convert `.d.ts` files to F# bindings directly from your browser without installing anything.
14+
15+
This is also the tool that you should use to report issues if possible.
16+
17+
💡 The web interface is more often updated than the NPM package
18+
19+
### CLI via NPM
20+
21+
The CLI can be invoked using `npx`:
22+
23+
```bash
24+
npx @glutinum/cli --help
25+
```
26+
27+
or installed locally:
28+
29+
```bash
30+
npm i -D @glutinum/cli
31+
```
32+
33+
### Usage
34+
35+
```bash
36+
# Without installing the package
37+
npx @glutinum/cli ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs
38+
# Or with the installed package
39+
npx glue ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs
40+
```
41+
42+
or if you prefer you can pipe the output to a file:
43+
44+
```bash
45+
# Without installing the package
46+
npx @glutinum/cli ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
47+
# Or with the installed package
48+
npx glue ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
49+
```
50+
551
## Contributing
652

753
Glutinum.CLI use `./build.sh` or `./build.bat` as a build script.

0 commit comments

Comments
 (0)