What do you want to generate? This will match templates that start with this value. If you have the following templates:
1feature.component.js
2feature.reducer.js
You can run progen -w fe and it will match on both templates.
What is the name of the generated code? This name will be used as the name of the file or directory create.
Accepts a string of , separated key:value pairs. If the key appears between
dollar signs within the content of templates matched, it will be replaced with the
value provided. For example, if your template contains function $my-function-name$() {}
then you can call Progen with -s "my-function-name:main" and the resulting file
will have function main() {} in it.
You can also have many substitutions for one command. For example -s "ONE:first, TWO:second".
⚠️ The substitution will apply to all matches in the template content. If you have $NAME$ 3 times, all 3 instances will be changed.
Use this option to create a directory with all matching templates inside. If we have the following templates:
1feature.component.js
2feature.reducer.js
Our configuration output mapping is:
1{
2 "output": {
3 "feature": "./modules"
4 }
5}
Now, we run progen -w feature -n MyFeature Progen will produce:
1modules/
2 MyFeature/
3 component.js
4 reducer.js
Note: When we use
as-modulethe name is not appended to the resulting filename.
Use the -o arg to override the configuration. This will ignore every
other output mapping and place all files generated in the path provided.
The value must be a valid relative path to the root of the project specified in the config file.
Display all options with their descriptions. This is only the cli help so if you are looking for more help you may want to come back to the documentation.
Current Version: 0.0.0
Home
Quick Start
Config
Templates
CLI