@a7mooz/ts-gen
v2.0.2
Published
Typescript/JavaScript project generator
Downloads
14
Readme
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 andcommonjs
if a library)