mmit
v0.1.0
Published
A command tool to quickly generate files from templates directory.
Downloads
93
Readme
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.tsxUsage
mmit [template] [-o <path>] [-r <name>]Example
mmit component -o components -r buttonOptions
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"
}
}