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.
Bundle and transform javascript files, stylesheets, html imports and update DOM document
New in version 3: uses rollup for bundling, and still supports old-style bundling. New in version 4: resolve native relative imports, better async/await support.
npm install -g bundledom
This saves modified html file, and styles are bundled into js file:
bundledom
--html bundles/index.html
--js /bundles/index.js
-x jquery.js -x moment.js -i index.js
--prepend '/js/custom-elements.js'
public/index.html
This saves styles separately:
bundledom
--html bundles/index.html
--css /bundles/index.css
--js /bundles/index.js
--exclude jquery.js
--prepend '/js/custom-elements.js'
public/index.html
This does not compress files, and specifies root dir
bundledom
--concatenate
--html bundles/index.html
--css /bundles/index.css
--js /bundles/index.js
--exclude jquery.js
--prepend '/js/custom-elements.js'
--root public
public/templates/index.html
A tool to bundle a bunch of files:
bundledom-all
--filter "**/excluded-*.*"
--common common.html
--suffix 1.0.0
"templates/*.html"
it bundles common files then processes all files matching pattern and put everything with suffixes in a bundles/ directory.
See bundledom-all -h
for more command-line options.
Paths are relative to the input file path.
bundledom(path, opts, cb)
where path
is the path of the html file to process,
and opts
has these properties:
Strings are matched simply by searching a substring.
Tags without src or href attributes can be excluded or ignored by passing a dot ".", otherwise they are bundled.
Omitting js, css options skips the insertion of the corresponding tag in the html document.
If cb is omitted, returns a promise.
Returns an object with following properties:
bundledom --help
MIT, see LICENSE file.
FAQs
Bundle and transform javascript files, stylesheets, html imports and update DOM document
The npm package bundledom receives a total of 3 weekly downloads. As such, bundledom popularity was classified as not popular.
We found that bundledom demonstrated a not healthy version release cadence and project activity because the last version was released 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.
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.