Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
const prettierOptions = {
parser: 'babel',
printWidth: 80,
singleQuote: true,
trailingComma: 'es5',
proseWrap: 'always',
};
const MODULE_IMPORTS = `
import { getAttributes } from '@carbon/icon-helpers';
import PropTypes from 'prop-types';
import React from 'react';
const defaultStyle = ${JSON.stringify(
transformStyleIntoObject(defaultAttributes.style)
)};
`;
function createEntrypointFromMeta(meta) {
const components = meta.map(info => {
const source = createComponentFromInfo(info);
return `export ${source}`;
});
const source = `${MODULE_IMPORTS}
${components.join('\n')}`;
return babel.transformSync(source, babelOptions);
}
function createModuleFromInfo(info) {
const source = `