Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ into a single parse result. A directive character (`@` by default) marks a
reference; the plugin resolves it, processes the resolved text, and splices
the result into the parse output.

The repository ships **two implementations**:
The repository ships **two implementations**, side by side, mirroring the
layout of [`github.com/voxgig/util`](https://github.com/voxgig/util):

- **TypeScript** — `src/`, tests in `test/`, built to `dist/` + `dist-test/`.
- **TypeScript** — lives entirely under `ts/`: sources in `ts/src/`, tests in
`ts/test/`, built to `ts/dist/` + `ts/dist-test/`. The npm package
(`ts/package.json`) is published from `ts/`, and all its paths are relative
to that folder.
- **Go** — `go/`, a port published as the `github.com/jsonicjs/multisource/go`
module.

Expand All @@ -37,17 +41,19 @@ Use the `Makefile` targets (they wrap npm and go):
```sh
make build # build-ts + build-go
make test # test-ts + test-go
make build-ts # npm run build (tsc --build src test)
make test-ts # npm test (node --test dist-test/*.test.js)
make build-ts # cd ts && npm run build (tsc --build src test)
make test-ts # cd ts && npm test (node --test dist-test/*.test.js)
make build-go # cd go && go build ./...
make test-go # cd go && go test ./...
```

Notes:

- TS tests run against the **built** output in `dist-test/`, so run
`make build-ts` (or `npm run build`) before `make test-ts`.
- `npm run reset` does a clean reinstall + build + test.
- The TypeScript package lives in `ts/`; run npm commands from there
(`cd ts && npm ...`) or use the `make` targets, which `cd ts` for you.
- TS tests run against the **built** output in `ts/dist-test/`, so run
`make build-ts` (or `cd ts && npm run build`) before `make test-ts`.
- `cd ts && npm run reset` does a clean reinstall + build + test.
- Go has no external runtime deps beyond the other `jsonicjs/*/go` modules.

## Resolver & processor parity
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ test: test-ts test-go

clean: clean-ts clean-go

# TypeScript
# TypeScript (package lives in ts/)
build-ts:
npm run build
cd ts && npm run build

test-ts:
npm test
cd ts && npm test

clean-ts:
rm -rf dist dist-test
rm -rf ts/dist ts/dist-test

# Go
build-go:
Expand Down Expand Up @@ -45,7 +45,7 @@ tags-go:
git tag -l 'go/v*' --sort=-version:refname

reset:
npm run reset
cd ts && npm run reset
cd go && go clean -cache
cd go && go build ./...
cd go && go test -v ./...
21 changes: 21 additions & 0 deletions ts/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 jsonicjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading