gulp-usemin
Advanced tools
Comparing version 0.3.28 to 0.3.29
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, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
363
52973
5
108
+ Addedplugin-error@~1.0.1
+ Addedvinyl@~2.1.0
+ Addedansi-colors@1.1.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedextend-shallow@3.0.2(transitive)
+ Addedis-extendable@1.0.1(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedplugin-error@1.0.1(transitive)
+ Addedvinyl@2.1.0(transitive)
- Removedgulp-util@~3.0.8
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.32.2.1(transitive)