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

gulp-bower

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-bower - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

23

index.js

@@ -8,4 +8,6 @@ var bower = require('bower');

module.exports = function (opts) {
var toString = {}.toString;
module.exports = function (opts, cmdArguments) {
var stream = through.obj(function(file, enc, callback) {

@@ -16,3 +18,3 @@ this.push(file);

if (typeof opts === 'string') {
if (toString.call(opts) === '[object String]') {
opts = {

@@ -38,3 +40,18 @@ directory: opts

bower.commands.install([], {}, opts)
var cmd = opts.cmd;
if (!cmd) {
cmd = 'install';
}
delete(opts.cmd);
if (toString.call(cmdArguments) !== '[object Array]') {
cmdArguments = [];
}
if (toString.call(cmdArguments[0]) !== '[object Array]') {
cmdArguments[0] = [];
}
cmdArguments[1] = cmdArguments[1] || {};
cmdArguments[2] = opts;
bower.commands[cmd].apply(bower.commands, cmdArguments)
.on('log', function(result) {

@@ -41,0 +58,0 @@ gutil.log(['bower', gutil.colors.cyan(result.id), result.message].join(' '));

2

package.json
{
"name": "gulp-bower",
"version": "0.0.6",
"version": "0.0.7",
"description": "Install Bower packages.",

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

@@ -17,2 +17,3 @@ # gulp-bower

```javascript
var gulp = require('gulp');
var bower = require('gulp-bower');

@@ -31,2 +32,3 @@

```javascript
var gulp = require('gulp');
var bower = require('gulp-bower');

@@ -43,2 +45,3 @@

```javascript
var gulp = require('gulp');
var bower = require('gulp-bower');

@@ -52,4 +55,20 @@

By default `gulp-bower` runs `install` command for Bower.
Using `cmd` property, you can specify the custom command. (e.g. `update`)
```javascript
var bower = require('gulp-bower');
gulp.task('bower', function() {
return bower({ cmd: 'update'});
});
```
## Changelog
#####0.0.7
- Added commands support (by Keksinautin)
#####0.0.6

@@ -56,0 +75,0 @@ - Added ability to pass in an initialization object that allows a cwd to be specified (by cb1kenobi)

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