Skip to content

Commit

Permalink
Refactors repl and cli parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
bas080 committed May 21, 2023
1 parent 6182455 commit 7c8f47b
Show file tree
Hide file tree
Showing 25 changed files with 831 additions and 397 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.0.23](https://github.com/bas081/furver/compare/v0.0.23...v0.0.23)

- Break the api and replace post and get with call [`79db910`](https://github.com/bas081/furver/commit/79db91078b3cd41b0d58d07b17c18d3a9aab7056)
- fixup! fixup! Break the api and replace post and get with call [`65e4500`](https://github.com/bas081/furver/commit/65e450006286ccd7bddef0bc6fb67184e93ea5d9)
- fixup! Break the api and replace post and get with call [`ec36d3f`](https://github.com/bas081/furver/commit/ec36d3fb1c83346fd30b30e2785f7d4d19ca20ce)
- Refactors repl and cli parsing [`d8aaa86`](https://github.com/bas081/furver/commit/d8aaa86774c1bc5049aecdf98fe9f37f4650306a)
- Break the api and replace post and get with call [`6182455`](https://github.com/bas081/furver/commit/618245512c2ff9820081245900e233c139e8f4f9)
- fixup! Refactors repl and cli parsing [`f9bc808`](https://github.com/bas081/furver/commit/f9bc808689dc7149c41c98bd80fe8f9136a7a52c)

#### [v0.0.23](https://github.com/bas081/furver/compare/v0.0.22...v0.0.23)

Expand Down
81 changes: 61 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Contributing

## Dependencies

Lists projects dependencies and the versions.

```bash bash
npm --version # Dependency management
node --version # Testing and implementation
bash --version # For usage examples

# Examples on how to use server
curl --version | head -n 1 | cut -f -2 -d ' '
```
```
9.6.6
v20.2.0
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
curl 7.68.0
```

Other:

- [markatzea][markatzea]

## Development

First clone the project and then run `npm link`.
Expand All @@ -20,26 +48,24 @@ removed 1 package, and audited 483 packages in 1s
found 0 vulnerabilities
added 320 packages, and audited 483 packages in 3s
added 320 packages in 5s
35 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
up to date, audited 3 packages in 1s
found 0 vulnerabilities
added 1 package, and audited 484 packages in 1s
added 1 package, and audited 484 packages in 2s
35 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
```

You should now be able to run the bin scripts.
You should now be able to run the bin scripts and tests.

## Tests

Expand All @@ -54,23 +80,26 @@ npm t -- -R classic
> furver@0.0.23 test
> tap *.test.mjs --no-cov -R classic
cli.test.mjs .......................................... 4/4
cli.test.mjs .......................................... 4/4 1s
client.test.mjs ..................................... 12/12
debounce.test.mjs ..................................... 3/3
lisp.test.mjs ....................................... 10/10
promises.test.mjs ................................... 10/10
server.test.mjs ....................................... 4/4
total ............................................... 43/43
43 passing (1s)
43 passing (2s)
ok
```

## Formatting

```bash bash
npx standard
npx standard || {
npx standard --fix
exit 1
}
```

## Client Bundle
Expand All @@ -88,28 +117,40 @@ git add ./client.min.js

## Documentation

Generate docs with [markatzea][markatzea].

```bash bash
# Spawn a server to demonstrate examples.
set -euo pipefail

# Spawn a server to demonstrate examples.
export PORT=8999
npx furver server ./example/api.mjs&

npx furver ./example/api.mjs&

# Could use pinging instead to wait for the server to start.
sleep 4

rm -f README.md

markatzea README.mz | tee README.md 1>&2


for mz in *.mz ;do
test "$mz" = "CONTRIBUTING.mz" && continue
name="${mz%.*}"
md="${name}.md"
echo "Generating docs for: $mz > $md"
rm -f "$md"
markatzea "$mz" | tee "$md" 1>&2
chmod -w "$md"
done

# Add a TOC
chmod +w README.md
npx markdown-toc -i README.md
chmod -w README.md

chmod -w ./README.md

# Stop the server
pkill furver
```
```
Generating docs for: client.mz > client.md
Generating docs for: lisp.mz > lisp.md
Generating docs for: README.mz > README.md
Generating docs for: server.mz > server.md
```

## Changelog

Expand Down
54 changes: 40 additions & 14 deletions CONTRIBUTING.mz
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Contributing

## Dependencies

Lists projects dependencies and the versions.

```bash bash
npm --version # Dependency management
node --version # Testing and implementation
bash --version # For usage examples

# Examples on how to use server
curl --version | head -n 1 | cut -f -2 -d ' '
```

Other:

- [markatzea][markatzea]

## Development

First clone the project and then run `npm link`.
Expand All @@ -12,7 +29,7 @@ npm link furver
git add package-lock.json
```

You should now be able to run the bin scripts.
You should now be able to run the bin scripts and tests.

## Tests

Expand All @@ -26,7 +43,10 @@ npm t -- -R classic
## Formatting

```bash bash
npx standard
npx standard || {
npx standard --fix
exit 1
}
```

## Client Bundle
Expand All @@ -38,26 +58,32 @@ git add ./client.min.js

## Documentation

Generate docs with [markatzea][markatzea].

```bash bash
# Spawn a server to demonstrate examples.
set -euo pipefail

# Spawn a server to demonstrate examples.
export PORT=8999
npx furver server ./example/api.mjs&

npx furver ./example/api.mjs&

# Could use pinging instead to wait for the server to start.
sleep 4

rm -f README.md

markatzea README.mz | tee README.md 1>&2


for mz in *.mz ;do
test "$mz" = "CONTRIBUTING.mz" && continue
name="${mz%.*}"
md="${name}.md"
echo "Generating docs for: $mz > $md"
rm -f "$md"
markatzea "$mz" | tee "$md" 1>&2
chmod -w "$md"
done

# Add a TOC
chmod +w README.md
npx markdown-toc -i README.md
chmod -w README.md

chmod -w ./README.md

# Stop the server
pkill furver
```

Expand Down

0 comments on commit 7c8f47b

Please sign in to comment.