Gathering detailed insights and metrics for gulp-bower-normalize
Gathering detailed insights and metrics for gulp-bower-normalize
Gathering detailed insights and metrics for gulp-bower-normalize
Gathering detailed insights and metrics for gulp-bower-normalize
Normalize bower files so checked in structure is consistent.
npm install gulp-bower-normalize
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
46 Stars
49 Commits
11 Forks
3 Watchers
3 Branches
6 Contributors
Updated on Sep 21, 2024
Latest Version
1.1.3
Package Id
gulp-bower-normalize@1.1.3
Unpacked Size
28.33 kB
Size
6.84 kB
File Count
16
NPM Version
8.1.2
Node Version
16.13.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
6
Use rules in the bower.json or implicit rules to normalize the files being copied out of bower_components so that a consistent and clean version of the bower dependencies can be checked into the repo. This is intended to work with main-bower-files.
npm install --save-dev gulp-bower-normalize
Designed to work with main-bower-files as so:
1gulp.task('default', function() { 2 var bower = require('main-bower-files'); 3 var bowerNormalizer = require('gulp-bower-normalize'); 4 return gulp.src(bower(), {base: './bower_components'}) 5 .pipe(bowerNormalizer({bowerJson: './bower.json'})) 6 .pipe(gulp.dest('./bower_dependencies/')) 7});
bower.json
1{ 2 name and otherstuff 3 "dependencies": { 4 "dependency1": "~1.0.1" 5 "dependency2": "~1.0.1" 6 "dependency3": "~1.0.1" 7 "dependency4": "~1.0.1" 8 }, 9 "overrides": { 10 // Muli allows one normalize definition to span multiple dependencies 11 // NOTE: This is first one in wins for the multi list and will always 12 // defer to the overrides. 13 "normalizeMulti": [ 14 { 15 "dependencies": ["dependency1", "dependency2"], 16 "normalize": { 17 "img": ["*.jpeg", "*.png", "*.jpg"], 18 "font": ["*.ttf", "*.woff2"] 19 } 20 }, 21 { 22 "dependencies": ["dependency2", "dependency3"], 23 "normalize": { 24 // Note since dependency3 defines js, it won't get this definition 25 "js": ["*.js", "*.less"], 26 } 27 }, 28 { 29 "dependencies": ["dependency2"], 30 "normalize": { 31 // Note since dependency2 already had js defined by the multi, it won't get this definition 32 "js": ["*.*"], 33 } 34 } 35 ], 36 // Implicitly normalizes this file by file extension 'dependency1/js/some.js' 37 "dependency1": { 38 "main": "some.js" 39 }, 40 // Implicitly organized into 'dependency2/js/some.js' 'dependency2/js/some.js' 41 "dependency2": { 42 "main": ["some.js", "some.css"] 43 }, 44 // Explicitly organized into 'dependency3/js/some.js', 'dependency3/css/some.ext', 'dependency3/css/some.css' 45 "dependency3": { 46 "main": ["some.js", "some.ext", "some.css"], 47 "normalize": { 48 "js": "*.js", 49 "css": ["*.ext", "*.css"] 50 } 51 } // dependency4 is implicitly organized into 'dependency4/<ext>/<file> 52 } 53}
Note: Comments are not valid JSON, so if you're copying this, you'll need to remove them.
Type: string
Default: process.cwd()
Path to search for the bower.json file in.
Type: string
Default: ./bower.json
Path to bower.json that overrides will come from. This should be relative to options.BasePath
.
Type: boolean
Default: false
Option to remove the component level folders. This would turn /lib/jquery/js/jquery.js
into /lib/js/jquery.js
.
Note: If your components have files with the same name then only one of them will be included in the results.
Type: boolean
Default: false
Option to put the type folder on top of the hierarchy. This would turn /lib/jquery/js/jquery.js
into /lib/js/jquery/jquery.js
.
Type: boolean
Default: false
This option allows a multi-level path on the normalization destination. This allows matching similar to the following:
"dependency7": {
"main": ["some.js", "some/other.js"],
"normalize": {
"js": "*.js",
"js/some": "**/some/*.js"
}
}
Note: This will not work in conjunction with the flatten option.
Be aware of your JSON keys of the normalize property of your bower.json
.
Only unique JSON keys could be parsed correctly into your expected destination folder structure.
This could lead to unexpected normalization
"normalize": {
".": "**/*.scss",
".": "**/*.js"
}
The right expression should be
"normalize": {
".": ["**/*.scss", "**/*.js"]
}
MIT © Myles Bostwick
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 5/19 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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 More