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

gulp-usemin

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-usemin - npm Package Compare versions

Comparing version 0.3.28 to 0.3.29

4

index.js
module.exports = function(options) {
var through = require('through2');
var gutil = require('gulp-util');
var PluginError = require('plugin-error');
var blocksBuilder = require('./lib/blocksBuilder.js');

@@ -9,3 +9,3 @@ var htmlBuilder = require('./lib/htmlBuilder.js');

if (file.isStream()) {
this.emit('error', new gutil.PluginError('gulp-usemin', 'Streams are not supported!'));
this.emit('error', new PluginError('gulp-usemin', 'Streams are not supported!'));
callback();

@@ -12,0 +12,0 @@ }

var fs = require('fs');
var glob = require('glob');
var path = require('path');
var gutil = require('gulp-util');
var PluginError = require('plugin-error');
var Vinyl = require('vinyl');

@@ -56,3 +57,3 @@ module.exports = function(file, options) {

if (cssMediaQuery != media)
throw new gutil.PluginError('gulp-usemin', 'incompatible css media query for ' + a + ' detected.');
throw new PluginError('gulp-usemin', 'incompatible css media query for ' + a + ' detected.');
}

@@ -65,6 +66,6 @@ });

if(filepaths[0] === undefined && !options.skipMissingResources) {
throw new gutil.PluginError('gulp-usemin', 'Path ' + paths[i] + ' not found!');
throw new PluginError('gulp-usemin', 'Path ' + paths[i] + ' not found!');
} else {
filepaths.forEach(function (filepath) {
files.push(new gutil.File({
files.push(new Vinyl({
path: filepath,

@@ -71,0 +72,0 @@ contents: fs.readFileSync(filepath)

module.exports = function(file, blocks, options, push, callback) {
var path = require('path');
var gutil = require('gulp-util');
var Vinyl = require('vinyl');
var pipeline = require('./pipeline.js');

@@ -12,3 +12,3 @@

var filePath = path.join(path.relative(basePath, mainPath), name);
return new gutil.File({
return new Vinyl({
path: filePath,

@@ -15,0 +15,0 @@ contents: new Buffer(content)

{
"name": "gulp-usemin",
"version": "0.3.28",
"version": "0.3.29",
"description": "Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views).",
"main": "index.js",
"dependencies": {
"gulp-util": "~3.0.8",
"glob": "~7.1.1",
"gulp-concat": "~2.6.1",
"plugin-error": "~1.0.1",
"through2": "~2.0.3",
"glob": "~7.1.1",
"gulp-concat": "~2.6.1"
"vinyl": "~2.1.0"
},

@@ -12,0 +13,0 @@ "devDependencies": {

[![Build Status](https://travis-ci.org/zont/gulp-usemin.svg?branch=master)](https://travis-ci.org/zont/gulp-usemin)
> Deprecated. Please use [Browserify](https://www.npmjs.com/package/browserify) or [Webpack](https://www.npmjs.com/package/webpack)
# gulp-usemin

@@ -243,2 +245,5 @@ > Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views).

#####0.3.29
- Migrate gulp-util to individual modules (by pioug)
#####0.3.28

@@ -245,0 +250,0 @@ - Update dependancies and replace deprecated packages (by JamyGolden)

@@ -8,3 +8,2 @@ /* jshint node: true */

var fs = require('fs');
var gutil = require('gulp-util');
var PassThrough = require('stream').PassThrough;

@@ -14,5 +13,6 @@ var path = require('path');

var vfs = require('vinyl-fs');
var Vinyl = require('vinyl');
function getFile(filePath) {
return new gutil.File({
return new Vinyl({
path: filePath,

@@ -71,3 +71,3 @@ base: path.dirname(filePath),

var fakeStream = new PassThrough();
var fakeFile = new gutil.File({
var fakeFile = new Vinyl({
contents: fakeStream

@@ -93,3 +93,3 @@ });

var content = '<div>content</div>';
var fakeFile = new gutil.File({
var fakeFile = new Vinyl({
path: 'test.file',

@@ -685,3 +685,2 @@ contents: new Buffer(content)

var through = require('through2');
var File = gutil.File;

@@ -691,3 +690,3 @@ return through.obj(function(file) {

stream.push(new File({
stream.push(new Vinyl({
cwd: file.cwd,

@@ -699,3 +698,3 @@ base: file.base,

stream.push(new File({
stream.push(new Vinyl({
cwd: file.cwd,

@@ -702,0 +701,0 @@ base: file.base,

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