Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
gulp-main-bower-files
Advanced tools
================
Use main-bower-files in a more gulp like way.
Use the bower.json file as the source and it will create a vinyl stream for each of the files main-bower-files return when parsing the bower.json.
$ npm install gulp-main-bower-files --save-dev
var gulp = require('gulp');
var mainBowerFiles = require('gulp-main-bower-files');
gulp.task('main-bower-files', function() {
return gulp.src('./bower.json')
.pipe(mainBowerFiles([[filter, ]options][, callback]))
.pipe(gulp.dest('./wwwroot/libs'));
});
The parameters are passed on to main-bower-files.
The following example produces minified output using gulp-uglify
$ npm install --save-dev gulp-uglify
var gulp = require('gulp');
var mainBowerFiles = require('gulp-main-bower-files');
var uglify = require('gulp-uglify');
gulp.task('uglify', function(){
return gulp.src('./bower.json')
.pipe(mainBowerFiles( ))
.pipe(uglify())
.pipe(gulp.dest('wwwroot/libs'));
});
var gulp = require('gulp');
var mainBowerFiles = require('gulp-main-bower-files');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var gulpFilter = require('gulp-filter');
gulp.task('main-bower-files', function() {
var filterJS = gulpFilter('**/*.js', { restore: true });
return gulp.src('./bower.json')
.pipe(mainBowerFiles({
overrides: {
bootstrap: {
main: [
'./dist/js/bootstrap.js',
'./dist/css/*.min.*',
'./dist/fonts/*.*'
]
}
}
}))
.pipe(filterJS)
.pipe(concat('vendor.js'))
.pipe(uglify())
.pipe(filterJS.restore)
.pipe(gulp.dest('./wwwroot/libs'));
});
FAQs
Use main-bower-files in a more gulp like way.
The npm package gulp-main-bower-files receives a total of 829 weekly downloads. As such, gulp-main-bower-files popularity was classified as not popular.
We found that gulp-main-bower-files 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.