# t6e

> Run npx t6e to discover how to create your templates

Latest version **1.0.1** (published 2022-04-12) · 0 weekly downloads

## Install

```sh
npm install t6e
pnpm add t6e
yarn add t6e
bun add t6e
```

Provides the command `t6e`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-04-12 |
| First published | 2022-04-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | butopen |

## Links

- npm: https://www.npmjs.com/package/t6e
- npm.io page: https://npm.io/package/t6e

## Recent versions

- 1.0.1 (latest) — 2022-04-12
- 1.0.0 — 2022-04-09

## README

# T6e: scaffold any local template to a file

T6e is a small tool (no dependencies, 50 lines of code) to scaffold any local template and 
speed up the creation of files in a project using your custom templates or templates from the community. 

It will make you save seconds at every file scaffolding, minutes every day. hours every month.

And you will not need to copy/past/delete anymore to duplicate a file.

## The problem

We developers are lazy and we love our way of writing code.

Everytime we create new file, we already have its template in mind.

Now you can write that template once, and use it anytime with your custom params.

## How does it work?

Suppose you love Svelte (or any other framework).

Suppoose you love tailwind (or any other custom library you want to always integrate in your files).

You can save your perfect template into a file. 

Let's look at the Svelte example. Here I'm creating a template with a `$name` parameter.

This parameter can be used in the **file name** and in the **file content**.

And you may have as many parameters as you like.

They will all be replaced properly.

```
<script lang="ts">
// saved as $name.svelte somewhere
  import { createEventDispatcher } from 'svelte';
  import { writable } from 'svelte/store';
  const dispatch = createEventDispatcher();
  
  const store = writable({
    hello: ""
  });
  
  
</script>

<div class="$name">
    {$store.hello}
</div>

<style lang="scss">
    .$name {
        @apply block
    }
</style>
```

Suppose you save it in `templates/$name.svelte`

Now run

```
npx t6e templates/$name.svelte src/components name=counter
```

And boom!!

You now have a new svelte component in your `src/components` folder 
with `$name` replaced with "counter"

---
_Source: https://npm.io/package/t6e · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
