Last active
August 8, 2019 20:16
-
-
Save codeBelt/a7d3cb1cf75ff6975ac1822522a23401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {generateTemplateFiles} = require('generate-template-files'); | |
generateTemplateFiles([ | |
// Example of generating multiple files | |
{ | |
option: 'Create Redux Store', | |
defaultCase: '(pascalCase)', | |
entry: { | |
folderPath: './tools/templates/', | |
}, | |
stringReplacers: ['__store__', '__model__'], | |
output: { | |
path: './src/stores/__store__(kebabCase)', | |
pathAndFileNameDefaultCase: '(pascalCase)', | |
}, | |
onComplete: (results) => { | |
console.log(`results`, results); | |
}, | |
}, | |
// Example of generating a single file | |
{ | |
option: 'Create Redux Reduce', | |
defaultCase: '(pascalCase)', | |
entry: { | |
folderPath: './tools/templates/__store__Reducer.ts', | |
}, | |
stringReplacers: ['__store__', '__model__'], | |
output: { | |
path: './src/stores/__store__/__store__(pascalCase)Reducer.ts', | |
pathAndFileNameDefaultCase: '(kebabCase)', | |
}, | |
}, | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment