
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@drawbotics/extract-emotion
Advanced tools
Small utility to extract CSS styles from emotion components
Very basic tool to do one thing: extract into a css bundle the CSS generated by emotion.
We created this tool for a specific use case, where React is the main source of the library (including CSS styling), and we wanted to generate a vanilla JS version of our library. Instead of replicating the CSS twice in emotion
and in pure CSS, we made a cli tool to get all the styles into a separate bundle.
We did this because emotion
generates classnames and applies styles at runtime, meaning it can't be extracted by webpack plugins currently available, like MiniCSSExtractPlugin.
Prerequisite Notes
The tool requires you to have react
and emotion
installed to work, since the input file given to the tool should include/import the react components using emotion
. The entry point should already have been transpiled with babel, that step isn't done by the tool.
npm install -D @drawbotics/extract-emotion
npx extract-emotion ./index.js --output ./output-dir
filename
: Name of the generated CSS bundle file. If this is not passed, it will default to style.css
prefix
: The tool removes the emotion hashes on classnames, if you want to add a prefix to all your classnames here is where you define itoutput
: Directory to which the CSS bundle will be written tonpm run test
npm run build
FAQs
Small utility to extract CSS styles from emotion components
The npm package @drawbotics/extract-emotion receives a total of 1 weekly downloads. As such, @drawbotics/extract-emotion popularity was classified as not popular.
We found that @drawbotics/extract-emotion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.