Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Messages][JavaScript] Add schemas to npm package #2010

Merged
merged 4 commits into from
Jun 20, 2022
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
3 changes: 3 additions & 0 deletions messages/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

* [Javascript] Adding the json schemas of the messages to the NPM package
([PR#2010](https://github.com/cucumber/common/pull/2010))

### Changed

### Deprecated
Expand Down
6 changes: 5 additions & 1 deletion messages/javascript/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
include default.mk

JSONSCHEMAS = $(shell find ../jsonschema -name "*.json")
LOCAL_SCHEMAS = $(patsubst ../jsonschema/%, schema/%, $(JSONSCHEMAS))

.codegen: src/messages.ts src/version.ts
.codegen: src/messages.ts src/version.ts $(LOCAL_SCHEMAS)

schema/%.json: ../jsonschema/%.json
cp $< $@

src/messages.ts: $(JSONSCHEMAS) ../jsonschema/scripts/codegen.rb ../jsonschema/scripts/templates/typescript.ts.erb ../jsonschema/scripts/templates/typescript.enum.ts.erb
ruby ../jsonschema/scripts/codegen.rb TypeScript ../jsonschema typescript.ts.erb > $@
Expand Down
1 change: 1 addition & 0 deletions messages/javascript/schema/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json
Empty file.