2.0.3 • Published 2 years ago

@pronix/ttcodegen v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm.io

ttcodegen

npm.io npm.io

Cli for creating file structures based on templates

Installation

npm i -g @pronix/ttcodegen

Using:

1. Create ttcodegen.json configuration file

{
  "templatesDirectoryPath": "./templates",
  "arguments": [],
  "options": [
    {
      "name": "component",
      "option": "-C",
      "description": "Create react component"
    },
    {
      "name": "service",
      "option": "-S",
      "description": "Create effector service"
    }
  ]
}

2. Create template files in directory with any option name

"./ttc/templates/service/{{name}}Service.container.tsx.hbs"

import React from 'react';
import { {{ name }}Service } from './{{ name }}Service.models';

const { inputs, outputs } = {{ name }}Service;

export const {{ cfl name }}Container = () => { return <></>; };

![](/assets/ttcFiles.png)

### 3. Run ttc

```bash
$ ttc -S ./src/services createTask

šŸ“‚ ./src/services/applyTask/

+ šŸ“„ applyTaskService.types.ts
+ šŸ“„ applyTaskService.models.ts
+ šŸ“„ applyTaskService.container.tsx
+ šŸ“„ applyTaskService.api.ts
+ šŸ“„ index.ts
2.0.3

2 years ago

2.0.2

2 years ago

2.0.0-beta-1

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago