Skip to content

Commit

Permalink
Convert to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleect committed Sep 15, 2023
1 parent 3c9ca38 commit c67b432
Show file tree
Hide file tree
Showing 48 changed files with 26,511 additions and 4,706 deletions.
21 changes: 6 additions & 15 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,26 @@

## Building

- `npx turbo build-src` Builds the project in to `dist/lib`
- `npx turbo build-bins` Builds the `cidlang.js` & `cidrepl.js` files in `dist/bins` in to executable binaries
- `dist/bins/cidlang-{linux|macos|windows.exe}`
- `dist/bins/cidrepl-{linux|macos|windows.exe}`
- `npm run build-docker` Builds the [Dockerfile](./Dockerfile) in to the image `cidlang`
- `npm run docs` Builds the documentation files in to `docs/`
- `npm run build` Runs `npx turbo build-src build-bins`

## Tests

- `npx turbo test` Runs all tests
- `npx turbo coverage` Runs all tests with coverage
- `npm run test:watch` Run tests and watch for changes

## Formatting/Linting

- `npm run typecheck` Typecheck code in `src`
- `npx turbo typecheck` Typecheck code
- `npx turbo lint` Runs eslint
- `npm run format` Format code with prettier
- `npx turbo format` Format code with prettier
- `npm run verify` Runs `npx turbo typecheck test lint`

## Running

- `npm run cli` Runs `dist/lib/cidlang.js`. Must run `npx turbo build-src` first.
- `npm run repl` Runs `dist/lib/cidrepl.js`. Must run `npx turbo build-src` first.
- `dist/bins/cidlang-{linux|macos|windows.exe}` Runs cidlang binary. Must run `npx turbo build-src build-bins` first.
- `dist/bins/cidrepl-{linux|macos|windows.exe}` Runs cidrepl binary. Must run `npx turbo build-src build-bins` first.
- `npm run cli-docker` Runs `cidlang` inside a docker container. Must run `npm run build-docker` first.
- `npm run repl-docker` Runs `cidrepl` inside a docker container. Must run `npm run build-docker` first.
- `npm run cli` Runs `apps/cidlang/dist/lib/cidlang.js`. Must run `npm run build` first.
- `npm run repl` Runs `apps/cidrepl/dist/lib/cidrepl.js`. Must run `npm run build` first.
- `apps/cidlang/dist/bins/cidlang-{linux|macos|windows.exe}` Runs cidlang binary. Must run `npm run build` first.
- `apps/cidrepl/dist/bins/cidrepl-{linux|macos|windows.exe}` Runs cidrepl binary. Must run `npm run build` first.

## Navigating

Expand Down
16 changes: 0 additions & 16 deletions Dockerfile

This file was deleted.

40 changes: 5 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,63 +21,33 @@ exec(`
### CLI

```bash
npm run build && ./dist/lib/cidlang.js spec/test.scm
npm run build && npm run cli -- spec/test.scm
```

### REPL

```bash
npm run build && ./dist/lib/cidrepl.js
npm run build && npm run repl

CID> (+ 10 25)
35
```

### Binaries

The `build-bins` script will build out a set of binaries. You must run `build-src` first or run `npm run build`.

- `dist/bins/cidlang-{linux|macos|windows.exe}`
- `dist/bins/cidrepl-{linux|macos|windows.exe}`

```bash
npm run build

./dist/bins/cidlang-linux spec/test.scm

./dist/bins/cidrepl-linux

CID> (+ 10 25)
35
```
apps/cidlang/dist/bins/cidlang-{linux|macos|windows.exe} spec/test.scm

### Docker
# .....

#### Repl

```bash
npm run build-docker
npm run repl-docker
apps/cidrepl/dist/bins/cidrep-{linux|macos|windows.exe}

CID> (+ 10 25)
35
```

#### Cli

```bash
npm run build-docker
npm run cli-docker

# Loading from filename: spec/test.scm
# -----------
# RESULTS
# -----------
# Passed: 20
# Failed: 0
# -----------
```

## Spec

Language spec tests are found in [./spec](./spec) and can be ran:
Expand Down
File renamed without changes.
Loading

0 comments on commit c67b432

Please sign in to comment.