2.0.2 • Published 6 months ago

@a7mooz/ts-gen v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

CLI

$ npx @a7mooz/ts-gen@latest
// Or
$ pnpm dlx @a7mooz/ts-gen
// Or (only yarn v3 and above)
$ yarn dlx @a7mooz/ts-gen

API

Installation

$ npm install @a7mooz/ts-gen
// Or
$ pnpm add @a7mooz/ts-gen
// Or
$ yarn add @a7mooz/ts-gen

Usage

ESM

import { create } from '@a7mooz/ts-gen';

create('project/path', {
    type: 'library',
    lang: 'ts',
    name: 'name',
    lint: true,
    hooks: true,
    commitLint: true,
});

CJS

const { create } = require('@a7mooz/ts-gen');

create('project/path', {
    type: 'library',
    lang: 'ts',
    name: 'name',
    lint: true,
    hooks: true,
    commitLint: true,
});

Options

  • name?: string

    The project's name (defaults to the dir's basename)

  • type: string

    The project's type (must be one of the available templates in template/templates)

  • lang: 'ts' | 'js'

    The project's language

  • lint?: boolean

    Whether to add linting (default true)

  • hooks?: boolean

    Whether to add husky git hooks (default true)

  • commitLint?: boolean

    Whether to add commit linting (only works with git hooks) (defaults to hooks option)

  • moduleType?: 'module' | 'commonjs'

    The module type (default module if a program and commonjs if a library)

2.0.2

6 months ago

2.0.1

6 months ago

1.3.2

7 months ago

2.0.0

7 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.5

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.0.1-alpha

9 months ago