@graphee/cli
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

@graphee/cli

TODO: description

Usage

const cli = require('@graphee/cli');

// TODO: DEMONSTRATE API

Overriding config

create file in root called `grapheeConfig.ts

import { UserDto } from 'users';
import { TenantDto } from 'tenants';

interface AddPlugin {
  add: { content: string[] };
}

type ConfigObject = {
  plugins?: AddPlugin[] | undefined;
  config: {
    [key: string]: string | boolean | Record<string, string>;
    mappers: Record<string, string>;
  };
};

type FullConfig = {
  react?: ConfigObject | undefined;
  client?: ConfigObject | undefined;
  server?: ConfigObject | undefined;
};

const Config: FullConfig = {
  server: {
    plugins: [
      {
        add: { content: ["import { random } from 'module';"] },
      },
    ],
    config: {
      mappers: {
        Tenant: 'TenantDto',
        User: 'UserDto',
      },
    },
  },
  client: {
    config: {
      mappers: {
        Tenant: 'TenantDto',
      },
    },
  },
  react: {
    config: {
      mappers: {
        User: 'UserDto',
      },
    },
  },
};

export default Config;

Imports will be automatically added if the Object exists in the Mappers.

Readme

Keywords

none

Package Sidebar

Install

npm i @graphee/cli

Weekly Downloads

33

Version

5.0.0

License

MIT

Unpacked Size

21.2 kB

Total Files

8

Last publish

Collaborators

  • trevorharwell
  • evisions-devops