Gathering detailed insights and metrics for broccoli-asset-rewrite
Gathering detailed insights and metrics for broccoli-asset-rewrite
Gathering detailed insights and metrics for broccoli-asset-rewrite
Gathering detailed insights and metrics for broccoli-asset-rewrite
Broccoli plugin to rewrite a source tree from an asset map.
npm install broccoli-asset-rewrite
Typescript
Module System
Min. Node Version
Node Version
NPM Version
95.8
Supply Chain
84.2
Quality
79.1
Maintenance
100
Vulnerability
98.6
License
JavaScript (100%)
Total Downloads
49,100,146
Last Day
9,153
Last Week
154,821
Last Month
687,085
Last Year
6,021,041
MIT License
10 Stars
108 Commits
53 Forks
6 Watchers
20 Branches
34 Contributors
Updated on Sep 08, 2022
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
broccoli-asset-rewrite@3.0.0
Size
6.37 kB
NPM Version
6.14.4
Node Version
12.16.2
Published on
Nov 30, 2020
Cumulative downloads
Total Downloads
Broccoli plugin to rewrite a source node from an asset map.
Turns
<script src="assets/appname.js">
background: url('/images/foo.png');
Into
<script src="https://subdomain.cloudfront.net/assets/appname-342b0f87ea609e6d349c7925d86bd597.js">
background: url('https://subdomain.cloudfront.net/images/foo-735d6c098496507e26bb40ecc8c1394d.png');
1npm install broccoli-asset-rewrite --save-dev
The asset map should have keys of the original names and values of the new names.
1var AssetRewrite = require('broccoli-asset-rewrite'); 2 3var generatedMap = { 4 'assets/appname.css': 'assets/appname-d1d59e0fdcfc183415ab0b72a4f78d9c.css', 5 'assets/appname.js': 'assets/appname-ed50537fcd5a71113cf79908f49e854d.js', 6 'assets/vendor.css': 'assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css', 7 'logo.png': 'logo-c4ab8191636f0a520d1f7f7a82c455a3.png' 8}; 9 10var assetNode = new AssetRewrite(node, { 11 assetMap: generatedMap, 12 replaceExtensions: ['html', 'js', 'css'], 13 prepend: 'https://subdomain.cloudfront.net/' 14});
assetMap
- Default: {}
- The asset map to rewrite source from.replaceExtensions
- Default: ['html', 'css']
- The file types to replace source code with new checksum file names.prepend
- Default: ''
- A string to prepend to all of the assets. Useful for CDN urls like https://subdomain.cloudfront.net/
ignore
- Default: []
- Ignore files from being rewritten.annotation
- Default: null - A human-readable description for this plugin instance.enableCaching
- Default: false - Setting to true will enable caching but may cause problems in typical usage with broccoli-asset-rev.Node 10 or higher
Originally authored by @rickharrison
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/13 approved changesets -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
60 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-24.3%
9,153
Compared to previous day
Last Week
-13.8%
154,821
Compared to previous week
Last Month
1%
687,085
Compared to previous month
Last Year
1.2%
6,021,041
Compared to previous year