Gathering detailed insights and metrics for gulp-bower-files-from-html
Gathering detailed insights and metrics for gulp-bower-files-from-html
Gathering detailed insights and metrics for gulp-bower-files-from-html
Gathering detailed insights and metrics for gulp-bower-files-from-html
Extract the bower files from the html files according to script and link tags.
npm install gulp-bower-files-from-html
Typescript
Module System
Node Version
NPM Version
JavaScript (70.28%)
HTML (29.72%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
21 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jun 12, 2017
Latest Version
1.0.1
Package Id
gulp-bower-files-from-html@1.0.1
Size
648.59 kB
NPM Version
3.8.9
Node Version
4.4.4
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
5
Extract the bower files from the html files according to script and link tags.
npm install --save-dev gulp-bower-files-from-html
For example, there is a project:
.
|---bower_components
|---react
|---react.min.js
|---react-dom.min.js
|___...
|---dist
|---node_modules
|---src
|---index.html
|---index.jsx
|---index.scss
|___...
|---gulpfile.js
|---package.json
|---bower.json
|___...
ES6
into ES5
, scss
into css
and then put all 'html', 'css' and 'js' files to dist
(including src
).dist
(That is what the plugin does).1<!DOCTYPE html> 2<html lang='en'> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Example</title> 6 <script type="text/javascript" src="../bower_components/react/react.min.js"></script> 7 <script type="text/javascript" src="../bower_components/react/react-dom.min.js"></script> 8 </head> 9 <body> 10 <div id="mountNode"></div> 11 </body> 12</html>
1var gulp = require('gulp'); 2var gulpBowerFilesFromHtml = require('gulp-bower-files-from-html'); 3 4gulp.task('bower', function() { 5 return gulp.src('./src/index.html') 6 .pipe(gulpBowerFilesFromHtml()) 7 .pipe(gulp.dest('./dist')); 8});
As a result, the dist
will look like:
|---dist
|---bower_components
|---react.min.js
|___react-dom.min.js
|---src
|---index.html
|---index.js
|---index.css
|___...
ES6
into ES5
, scss
into css
and then put all 'html', 'css' and 'js' files to dist
(excluding src
).dist
(That is what the plugin does).1<!DOCTYPE html> 2<html lang='en'> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Example</title> 6 <script type="text/javascript" src="./bower_components/react/react.min.js"></script> 7 <script type="text/javascript" src="./bower_components/react/react-dom.min.js"></script> 8 </head> 9 <body> 10 <div id="mountNode"></div> 11 </body> 12</html>
The path of bower_components should omit
src
level and it should be relative to the html file indist
.
1var gulp = require('gulp'); 2var gulpBowerFilesFromHtml = require('gulp-bower-files-from-html'); 3 4gulp.task('bower', function() { 5 return gulp.src('./index.html', {base: './'}) 6 .pipe(gulpBowerFilesFromHtml()) 7 .pipe(gulp.dest('./dist')); 8});
Use option
base
ingulp.src
to specify the path of bower_components relative togulpfile.js
.
As a result, the dist
will look like:
|---dist
|---bower_components
|---react.min.js
|___react-dom.min.js
|---index.html
|---index.js
|---index.css
|___...
1var gulp = require('gulp'); 2var gulpBowerFilesFromHtml = require('gulp-bower-files-from-html'); 3 4// support multiple html files 5gulp.task('bower', function() { 6 return gulp.src(['./*.html'], {base: './'}) 7 .pipe(gulpBowerFilesFromHtml()) 8 .pipe(gulp.dest('./dist')); 9}); 10 11// support stream mode 12gulp.task('bower', function() { 13 return gulp.src(['./*.html'], {base: './', buffer: false}) 14 .pipe(gulpBowerFilesFromHtml()) 15 .pipe(gulp.dest('./dist')); 16});
Under the MIT license. See LICENSE file for more details.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/21 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
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
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