How to generate *.terms.js ?

I’m using lexer to define my DSL. and using the externalTokenizer to handle keyword case insensitivity – I referenced lexer-php to do this

But I can’t generate the *.terms.js file (similar to the php example code) via the lezer-generator command, which causes me to execute npm prepare with error.

npm run lezer-generator src\ulang.grammar -o src\ulang.js

The result of the execution:

> ulang-codemirror@0.1.0 lezer-generator
> lezer-generator

Multiple input files given
Usage: build-parser [--cjs] [--names] [--noTerms] [--output outfile] [--export name] file

I can’t get the ulang.terms.js file with this command, how can I fix it please. Looking forward to the answer, thanks a lot!

I think the problem is that you’re using npm run to run the command. That will look it up in package.json, and not, by default, pass along the command line arguments you’re giving to whatever the script defined there ends up running.

Thank you very much, through your help has solved the problem