Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-main-bower-files

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-main-bower-files - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

2

package.json
{
"name": "gulp-main-bower-files",
"version": "1.1.2",
"version": "1.1.3",
"description": "Use main-bower-files in a more gulp like way.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,2 +30,55 @@ # gulp-main-bower-files

The parameters are passed on to [main-bower-files](https://www.npmjs.com/package/main-bower-files#usage).
The parameters are passed on to [main-bower-files](https://www.npmjs.com/package/main-bower-files#usage).
### Using the Gulp pipeline to minify the resulting JavaScript
The following example produces minified output using [gulp-uglify](https://www.npmjs.com/package/gulp-uglify)
```bash
$ npm install --save-dev gulp-uglify
```
```javascript
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'));
});
```
### Using the Gulp pipeline to use Bootstrap with jQuery and minify the resulting JavaScript
```javascript
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');
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'));
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc