gulp-sitemap
Advanced tools
Comparing version 4.2.0 to 4.3.0
16
index.js
'use strict'; | ||
var chalk = require('chalk'); | ||
var defaults = require('lodash/defaults'); | ||
var gutil = require('gulp-util'); | ||
var log = require('fancy-log'); | ||
var path = require('path'); | ||
var PluginError = require('plugin-error'); | ||
var through = require('through2'); | ||
var Vinyl = require('vinyl'); | ||
@@ -17,3 +19,3 @@ var pluginName = 'gulp-sitemap'; | ||
mappings: [], | ||
newLine: gutil.linefeed, | ||
newLine: '\n', | ||
priority: undefined, | ||
@@ -29,7 +31,7 @@ spacing: ' ', | ||
msg = 'siteUrl is a required param'; | ||
throw new gutil.PluginError(pluginName, msg); | ||
throw new PluginError(pluginName, msg); | ||
} | ||
if (options.changeFreq) { | ||
msg = chalk.magenta('changeFreq') + ' has been deprecated. Please use ' + chalk.cyan('changefreq'); | ||
throw new gutil.PluginError(pluginName, msg); | ||
throw new PluginError(pluginName, msg); | ||
} | ||
@@ -49,3 +51,3 @@ // site url should have a trailing slash | ||
msg = 'Streaming not supported'; | ||
return callback(new gutil.PluginError(pluginName), msg); | ||
return callback(new PluginError(pluginName), msg); | ||
} | ||
@@ -73,6 +75,6 @@ | ||
msg = 'Files in sitemap: ' + entries.length; | ||
gutil.log(pluginName, msg); | ||
log(pluginName, msg); | ||
} | ||
//create and push new vinyl file for sitemap | ||
this.push(new gutil.File({ | ||
this.push(new Vinyl({ | ||
cwd: firstFile.cwd, | ||
@@ -79,0 +81,0 @@ base: firstFile.cwd, |
{ | ||
"name": "gulp-sitemap", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Generate a search engine friendly sitemap.xml using a Gulp stream", | ||
@@ -38,7 +38,9 @@ "repository": "pgilad/gulp-sitemap", | ||
"chalk": "^1.1.1", | ||
"gulp-util": "^3.0.7", | ||
"fancy-log": "^1.3.2", | ||
"lodash": "^4.6.1", | ||
"multimatch": "^2.0.0", | ||
"plugin-error": "^0.1.2", | ||
"slash": "^1.0.0", | ||
"through2": "^2.0.0" | ||
"through2": "^2.0.0", | ||
"vinyl": "^2.1.0" | ||
}, | ||
@@ -45,0 +47,0 @@ "devDependencies": { |
@@ -182,3 +182,4 @@ # [gulp](https://github.com/wearefractal/gulp)-sitemap | ||
getLoc(siteUrl, loc, entry) { | ||
return loc.substr(0, loc.lastIndexOf('.')) || loc; // Removes the file extension | ||
// Removes the file extension if it exists | ||
return loc.replace(/\.\w+$/, ''); | ||
}, | ||
@@ -238,3 +239,3 @@ hreflang: [{ | ||
getLoc: function(siteUrl, loc, entry) { | ||
return loc.substr(0, loc.lastIndexOf('.')) || loc; // Removes the file extension | ||
return loc.replace(/\.\w+$/, ''); | ||
} | ||
@@ -241,0 +242,0 @@ ``` |
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
15249
191
263
8
+ Addedfancy-log@^1.3.2
+ Addedplugin-error@^0.1.2
+ Addedvinyl@^2.1.0
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedclone@2.1.2(transitive)
+ Addedclone-buffer@1.0.0(transitive)
+ Addedclone-stats@1.0.0(transitive)
+ Addedcloneable-readable@1.1.3(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedreplace-ext@1.0.1(transitive)
+ Addedvinyl@2.2.1(transitive)
- Removedgulp-util@^3.0.7
- Removedbeeper@1.1.1(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.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)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedvinyl@0.5.3(transitive)