2.1.1 • Published 9 months ago
@atcute/lex-cli v2.1.1
@atcute/lex-cli
command line tool for generating TypeScript schemas out of lexicon documents
quick start
create a configuration file that instructs the tool on where to locate the lexicon documents and where it should put the generated TypeScript schemas:
// file: lex.config.js
import { defineLexiconConfig } from '@atcute/lex-cli';
export default defineLexiconConfig({
files: ['lexicons/**/*.json'],
outdir: 'src/lexicons/',
});then run the tool:
npm exec lex-cli generate -c ./lex.config.jshighly recommend packaging the generated schemas as a publishable library for others to use.