2.0.3 ā€¢ Published 12 months ago

@pronix/ttcodegen v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months 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

12 months ago

2.0.2

12 months ago

2.0.0-beta-1

12 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.0

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago