@@ -5,7 +5,7 @@ GHERKIN_PARSER = src/Parser.ts
55GHERKIN_RAZOR = gherkin-javascript.razor
66SOURCE_FILES = $(shell find . -name "* .js" | grep -v $(GHERKIN_PARSER ) )
77
8- GHERKIN = npx gherkin-javascript
8+ GHERKIN = node ./test-cli.mjs
99
1010GOOD_FEATURE_FILES = $(shell find ../testdata/good -name "* .feature" -o -name "* .feature.md")
1111BAD_FEATURE_FILES = $(shell find ../testdata/bad -name "* .feature" -o -name "* .feature.md")
@@ -33,18 +33,22 @@ clean-gherkin-languages: ## Remove gherkin-languages.json and any derived files
3333clean : # # Remove all build artifacts and files generated by the acceptance tests
3434 rm -rf .built
3535 rm -rf acceptance
36+ rm -rf dist
3637 rm -rf node_modules
3738
3839.DELETE_ON_ERROR :
3940
4041acceptance : .built $(ASTS ) $(PICKLES ) $(ERRORS ) $(SOURCES ) # # Build acceptance test dir and compare results with reference
4142
42- .built : node_modules $(SOURCE_FILES )
43+ .built : node_modules dist $(SOURCE_FILES )
4344 touch $@
4445
4546node_modules :
4647 npm install
4748
49+ dist :
50+ npm run build
51+
4852$(GHERKIN_PARSER ) : $(GHERKIN_RAZOR ) ../gherkin.berp
4953 berp -g ../gherkin.berp -t $< -o $@ --noBOM
5054
@@ -53,20 +57,20 @@ $(GHERKIN_LANGUAGES_JSON):
5357
5458acceptance/testdata/% .ast.ndjson : ../testdata/% ../testdata/% .ast.ndjson
5559 mkdir -p $(@D )
56- $(GHERKIN ) --no-source --no-pickles --predictable-ids $< | jq --sort-keys --compact-output " ." > $@
60+ $(GHERKIN ) --no-source --no-pickles $< | jq --sort-keys --compact-output " ." > $@
5761 diff --unified <( jq " ." $< .ast.ndjson) <( jq " ." $@ )
5862
5963acceptance/testdata/% .pickles.ndjson : ../testdata/% ../testdata/% .pickles.ndjson
6064 mkdir -p $(@D )
61- $(GHERKIN ) --no-source --no-ast --predictable-ids $< | jq --sort-keys --compact-output " ." > $@
65+ $(GHERKIN ) --no-source --no-ast $< | jq --sort-keys --compact-output " ." > $@
6266 diff --unified <( jq " ." $< .pickles.ndjson) <( jq " ." $@ )
6367
6468acceptance/testdata/% .source.ndjson : ../testdata/% ../testdata/% .source.ndjson
6569 mkdir -p $(@D )
66- $(GHERKIN ) --no-ast --no-pickles --predictable-ids $< | jq --sort-keys --compact-output " ." > $@
70+ $(GHERKIN ) --no-ast --no-pickles $< | jq --sort-keys --compact-output " ." > $@
6771 diff --unified <( jq " ." $< .source.ndjson) <( jq " ." $@ )
6872
6973acceptance/testdata/% .errors.ndjson : ../testdata/% ../testdata/% .errors.ndjson
7074 mkdir -p $(@D )
71- $(GHERKIN ) --no-source --predictable-ids $< | jq --sort-keys --compact-output " ." > $@
75+ $(GHERKIN ) --no-source $< | jq --sort-keys --compact-output " ." > $@
7276 diff --unified <( jq " ." $< .errors.ndjson) <( jq " ." $@ )
0 commit comments