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.
@userfrosting/gulp-bundle-assets
Advanced tools
Orchestrates JS and CSS bundle creation in an efficient and configurable manner.
Branch | Status |
---|---|
master |
Orchestrates JS and CSS bundle creation in an efficient and configurable manner.
npm i -D @userfrosting/gulp-bundle-assets
IMPORTANT
This is an ES module package targeting NodeJS^12.17.0 || >=13.2.0
, refer to the NodeJS ESM docs regarding how to correctly import. ESM loaders like@babel/loader
oresm
likely won't work as expected.
// gulpfile.mjs
import AssetBundler from "@userfrosting/gulp-bundle-assets";
import Gulp from "gulp";
import cleanCss from "gulp-clean-css";
import concatCss from "gulp-concat-css";
import uglify from "gulp-uglify";
import concatJs from "gulp-concat-js";
export function bundle() {
const config = {
bundle: {
example: {
scripts: [
"foo.js",
"bar.js"
],
styles: [
"foo.css",
"bar.css"
]
}
}
};
const joiner = {
Scripts(bundleStream, name) {
return bundleStream
.pipe(concatJs(name + ".js"))// example.js
.pipe(uglify());
},
Styles(bundleStream, name) {
return bundleStream
.pipe(concatCss(name + ".css"))// example.css
.pipe(cleanCss());
}
};
return Gulp.src("src/**")
.pipe(new AssetBundler(config, joiner))
.pipe(Gulp.dest("public/assets/"));
}
$ gulp bundle
A results callback can be provided as a third parameter. On completion, it will be provided with a mapping for bundles to their respective virtual file paths. Note that path transformations performed after the bundler (including dest
) won't be reflected and should be accounted for.
The "DIY" approach to bundle resulting mapping is used to permit deeper integration with any system, such as generating a file in the target language to decrease integration cost.
See docs/api.
This plugin was originally forked from gulp-bundle-assets to fix a CSS import bug. It has since undergone numerous refactors to improve performance and flexibility.
See CONTRIBUTING.md.
[5.0.3] - 2022-03-16
Error
, if they were not already.FAQs
Orchestrates JS and CSS bundle creation in an efficient and configurable manner.
We found that @userfrosting/gulp-bundle-assets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.