Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@roots/bud-minify
Advanced tools
CSS and JS minification for bud.js
Install @roots/bud-minify to your project.
Yarn:
yarn add @roots/bud-minify --dev
npm:
npm install @roots/bud-minify --save-dev
Option | type | Default |
---|---|---|
minify | TerserPlugin.MinimizerImplementation | terser |
include | TerserPlugin.BasePluginOptions['include'] | undefined |
exclude | TerserPlugin.BasePluginOptions['exclude'] | undefined |
extractComments | TerserPlugin.BasePluginOptions['extractComments'] | false |
parallel | TerserPlugin.BasePluginOptions['parallel'] | true |
terserOptions | TerserPlugin.TerserOptions | [object] |
Option | type | Default |
---|---|---|
minify | CSSMinimizerPlugin.MinimizerImplementation | lightningcss |
test | CSSMinimizerPlugin.BasePluginOptions['test'] | undefined |
include | CSSMinimizerPlugin.BasePluginOptions['include'] | undefined |
exclude | CSSMinimizerPlugin.BasePluginOptions['exclude'] | undefined |
parallel | CSSMinimizerPlugin.BasePluginOptions['parallel'] | true |
minimizerOptions | CSSMinimizerPlugin.BasePluginOptions['minimizerOptions'] | [object] |
Get the value of include
bud.minify.js.getInclude();
Set the value of include
bud.minify.js.setInclude(/.*/);
Get the value of exclude
bud.minify.js.getExclude();
Set the value of exclude
bud.minify.js.setExclude(/.*/);
Get the value of minify
.
bud.minify.js.getMinify();
Set the value of minify
. Since the value is a function you must wrap it in a callback.
const dubiousMinifier = async (input: unknown) => ({
code: Object.values(input).join(`\n`).replace(/\/\//g, `// 💸`),
});
bud.minify.js.setMinify(() => dubiousMinifier);
Get the value of parallel
.
bud.minify.js.getParallel();
Set the value of parallel
.
bud.minify.js.setParallel(true);
Get the value of extractComments
.
bud.minify.js.getExtractComments();
Set the value of extractComments
.
bud.minify.js.setExtractComments(true);
Get the value of terserOptions
.
bud.minify.js.getTerserOptions();
Set the value of terserOptions
.
bud.minify.js.setTerserOptions((options) => ({
...options,
mangle: false,
}));
Remove comments from output:
export default async (bud) => {
bud.minify.js.dropComments();
};
Remove console.*
statements from output.
export default async (bud) => {
bud.minify.js.dropConsole();
};
Contributions are welcome from everyone.
We have contribution guidelines to help you get started.
@roots/bud-minify is licensed under MIT.
Keep track of development and community news.
bud.js is an open source project and completely free to use.
However, the amount of effort needed to maintain and develop new features and projects within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider sponsoring Roots.
FAQs
CSS and JS minification for bud.js
The npm package @roots/bud-minify receives a total of 7,804 weekly downloads. As such, @roots/bud-minify popularity was classified as popular.
We found that @roots/bud-minify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.