Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@parcel/transformer-html
Advanced tools
@parcel/transformer-html is a plugin for the Parcel bundler that allows you to transform HTML files. It can handle various tasks such as injecting assets, processing inline scripts and styles, and more.
Injecting Assets
Automatically injects CSS and JS assets into the HTML file. This is useful for ensuring that all necessary assets are included in the final build.
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<script src="./index.js"></script>
</body>
</html>
Processing Inline Scripts and Styles
Processes inline scripts and styles, allowing you to write them directly in your HTML files. This can be useful for small scripts and styles that don't need to be in separate files.
<!DOCTYPE html>
<html>
<head>
<style>
body { background-color: #f0f0f0; }
</style>
</head>
<body>
<script>
console.log('Hello, world!');
</script>
</body>
</html>
Minification
Minifies the HTML, CSS, and JS to reduce the size of the final output. This helps in improving the load time of the web application.
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<script src="./index.js"></script>
</body>
</html>
html-webpack-plugin is a plugin for Webpack that simplifies the creation of HTML files to serve your Webpack bundles. It is similar to @parcel/transformer-html in that it can inject assets and process HTML files, but it is designed to work specifically with Webpack.
gulp-htmlmin is a Gulp plugin that minifies HTML files. While it focuses primarily on minification, it can be used in a Gulp workflow to achieve similar results to @parcel/transformer-html's minification feature.
html-minifier-terser is a standalone HTML minifier that can be used with various build tools. It offers extensive options for minifying HTML, similar to the minification feature of @parcel/transformer-html.
FAQs
Unknown package
The npm package @parcel/transformer-html receives a total of 166,427 weekly downloads. As such, @parcel/transformer-html popularity was classified as popular.
We found that @parcel/transformer-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.