A framework-agnostic, customizable Javascript module generator.
To install:
npm install --save-dev jenerate
To run:
jenerate <command> <arguments>
jenerate.conf.js:
var ReactJen = require('react-jen');
module.exports = {
component: [
{
template: ReactJen.component,
fileNameSchema: '<% ComponentName %>.js',
outputDir: './js/components/'
},
{
template: ReactJen.componentTest,
fileNameSchema: '<% ComponentName %>.test.js',
outputDir: './test/components/'
}
]
};
Note: When specifying outputDir
, this directory must already exist to prevent access errors. It can still be an empty directory.