Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
styles = Array.from(styles.values());
changeset = changeset.concat(styles);
file.metadata.astroturf = { styles, changeset };
if (opts.writeFiles !== false) {
styles.forEach(({ absoluteFilePath, value }) => {
outputFileSync(absoluteFilePath, stripIndent([value]));
});
}
},
visitor: visitors.merge([
{
Program: {
enter(_, state) {
state.defaultedOptions = defaults(state.opts, {
tagName: 'css',
allowGlobal: true,
styledTag: 'styled',
customCssProperties: 'cssProp', // or: true, false
});
},
},
ImportDeclaration: {
exit(path, state) {
const { tagName } = state.defaultedOptions;
const specifiers = path.get('specifiers');