Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/a7mooz/ts-gen
Typescript/JavaScript project generator
https://github.com/a7mooz/ts-gen
cli generator javascript package typescript
Last synced: about 2 months ago
JSON representation
Typescript/JavaScript project generator
- Host: GitHub
- URL: https://github.com/a7mooz/ts-gen
- Owner: A7mooz
- License: apache-2.0
- Created: 2023-09-09T07:42:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T18:05:10.000Z (3 months ago)
- Last Synced: 2024-10-29T20:11:21.638Z (3 months ago)
- Topics: cli, generator, javascript, package, typescript
- Language: TypeScript
- Homepage: https://npmjs.com/package/@a7mooz/ts-gen
- Size: 381 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
TS-GEN
# CLI
```bash
$ npx @a7mooz/ts-gen@latest
// Or
$ pnpm dlx @a7mooz/ts-gen
// Or (only yarn v3 and above)
$ yarn dlx @a7mooz/ts-gen
```# API
## Installation
```bash
$ npm install @a7mooz/ts-gen
// Or
$ pnpm add @a7mooz/ts-gen
// Or
$ yarn add @a7mooz/ts-gen
```## Usage
### ESM
```js
import { create } from '@a7mooz/ts-gen';create('project/path', {
type: 'library',
lang: 'ts',
name: 'name',
lint: true,
hooks: true,
commitLint: true,
});
```### CJS
```js
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)