0.1.0 • Published 5 months ago
mmit v0.1.0
mmit
A command tool to quickly generate files from templates directory.
Prerequisites
You need to create a templates
folder in your project root and add your template files to it, structured like this:
root:.
├─templates
│ ├─component
│ │ ├─index.tsx
Usage
mmit [template] [-o <path>] [-r <name>]
Example
mmit component -o components -r button
Options
If you do not specify any options, you will be prompted to input them interactively.
<template>
- Specify template directory-o <path>
- Specify output path, default is./
-r <name>
- Specify new file name. If you do not include this option, the file will retain its original name.
Of course, you can use -h
or --help
to display help information.
I recommend adding a shortcut command in scripts like this:
{
"scripts": {
"gen:component": "mmit component -o components -r button"
}
}
0.1.0
5 months ago