Socket
Socket
Sign inDemoInstall

gulp-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-sitemap - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

12

index.js

@@ -24,8 +24,5 @@ 'use strict';

var priority = params.priority && params.priority.toString() || '0.5';
//set default base site url
var siteUrl;
//set xml spacing. can be \t for tabs
var spacing = params.spacing || ' ';
//array to hold lines of output sitemap.xml

@@ -43,7 +40,7 @@ var xmlOutput = [].concat(xmlHeader);

*/
var addFile = function (file, lastmod, cb) {
var addFile = function (filename, lastmod, cb) {
//format mtime to ISO (same as +00:00)
lastmod = new Date(lastmod).toISOString();
//turn index.html into -> /
var relativeFile = file.relative.replace(/(index)\.(html?){1}$/, '', 'i');
var relativeFile = filename.replace(/(index)\.(html?){1}$/, '', 'i');
//url location. Use slash to convert windows \\ or \ to /

@@ -105,3 +102,3 @@ var loc = siteUrl + slash(relativeFile);

//add file to xml
return addFile(file, lastmod, cb);
return addFile(file.relative, lastmod, cb);
}

@@ -123,3 +120,3 @@

//add file to xml
return addFile(file, stats.mtime, cb);
return addFile(file.relative, stats.mtime, cb);
}.bind(this));

@@ -129,2 +126,3 @@ },

if (!firstFile) {
//no files
return cb();

@@ -131,0 +129,0 @@ }

{
"name": "gulp-sitemap",
"version": "0.2.4",
"version": "0.2.5",
"description": "Generate a search engine friendly sitemap.xml using a Gulp stream",

@@ -5,0 +5,0 @@ "license": "MIT",

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