@ronin/codegen
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

RONIN Codegen

tests code coverage install size

This package generates TypeScript code based on RONIN models.

Usage

import { generate } from '@ronin/codegen';
import { model, string } from 'ronin/schema';

const User = model({
  slug: 'user',
  pluralSlug: 'users',
  fields: {
    name: string(),
    email: string({ required: true }),
  },
});

const generateCode = generate([User]);
//       ^? string

Testing

Use the following command to run the test suite:

bun test

/@ronin/codegen/

    Package Sidebar

    Install

    npm i @ronin/codegen

    Weekly Downloads

    35

    Version

    1.6.0

    License

    Apache-2.0

    Unpacked Size

    61.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • juriadams
    • leo
    • codenn
    • nurodev