Skip to content

Instantly share code, notes, and snippets.

@qramilq
qramilq / constants.js
Last active May 12, 2022 19:37
Generating React component's files from command line
const { component, types, barrel } = require('./templates.js');
exports.DEFAULT_COMPONENT_BASE_PATH = './common/components';
exports.FILES_DATA = [
{
getPath: ({ componentName, componentPath }) => `${componentPath}/${componentName}.tsx`, // [component].tsx
getTemplate: component,
},
{