Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const fs = require('fs');
const path = require('path');
const t = require('@babel/types');
const template = require('@babel/template').default;
const syntaxJsx = require('@babel/plugin-syntax-jsx').default;
const {addDefault} = require('@babel/helper-module-imports');
const {stripIndent} = require('common-tags');
const stringHash = require('string-hash');
const utils = require('@reshadow/utils');
const {KEYS} = require('@reshadow/core');
const buildClassName = template.expression(`
NAME.${KEYS.__styles__}["ELEMENT"]
`);
const toObjectExpression = obj =>
t.objectExpression(
Object.entries(obj).map(([key, value]) =>
t.objectProperty(
t.stringLiteral(key),
t.templateLiteral(
[
t.templateElement({
raw: value,
cooked: value,
}),
],
[],
),