0.1.0 • Published 2 years agoCLI
mmit
Licence
MIT
Version
0.1.0
Deps
0
Size
46 kB
Vulns
0
Weekly
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"
}
}