Nutrient Packed Morsels

    simple-tjscli
    TypeScript icon, indicating that this package has built-in type declarations

    0.12.0 • Public • Published

    tjscli

    Download Status Github Star Github Issues NPM version License

    tjscli is interactive cli tool for JSONSchema generation from TypeScript interface. tjscli using two engine that YousefED/typescript-json-schema and vega/ts-json-schema-generator. You can select one tool after generate JSONSchema from TypeScript interface.

    Why tjscli?

    Usage

    See below example.

    # interfactive mode
    $ npx tjscli tsj
    
    # Pass file and type
    $ npx tjscli tsj -f hello.ts -t IPrompt
    

    Most case, Interactive mode satisfy your need. tjscli ask to you that interface file to convert JSONSchema.

    Options

    Engine tjs

    JSONSchema convert using by typescript-json-schema.

    • --project, -p
      • tsconfig.json path
    • --output-type, -u
      • output file type: json or ts, default value is ts
    • --output, -o
      • output directory
    • --prefix, -x
      • prefix of output filename, default 'JSC_'
      • ex> JSC_JSONSchemaFile.ts
    • --format, -r
      • output contents layout
      • TYPE_NAME replaced JSONSchema type name: Recommand @types/json-schema
      • SCHEMA_JSON_CONTENT replaced converted content
      • See example format in .tjsclirc

    Engine tsj

    Default engine. JSONSchema convert using by ts-json-schema-generator.

    tsj engine only

    • --extraTags, -a
      • extra tag option in ts-json-schema-generator.
    • --jsDoc, -d
      • jsDoc option in ts-json-schema-generator.
    • --expose, -e
      • expose option in ts-json-schema-generator.
    • --additionalProperties, -n
      • additionalProperties option in ts-json-schema-generator.

    Common

    • --project, -p
      • tsconfig.json path
    • --output-type, -u
      • output file type: json or ts, default value is ts
    • --output, -o
      • output directory
    • --prefix, -x
      • prefix of output filename, default 'JSC_'
      • ex> JSC_JSONSchemaFile.ts
    • --format, -r
      • output contents layout
      • TYPE_NAME replaced JSONSchema type name: Recommand @types/json-schema
      • SCHEMA_JSON_CONTENT replaced converted content
      • See example format in .tjsclirc

    Keywords

    none

    Install

    npm i simple-tjscli

    DownloadsWeekly Downloads

    45

    Version

    0.12.0

    License

    MIT

    Unpacked Size

    199 kB

    Total Files

    23

    Last publish

    Collaborators

    • jooni