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

gulp-manifest

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-manifest - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

6

index.js

@@ -6,4 +6,5 @@ "use strict";

gutil = require('gulp-util'),
hasher = require('crypto').createHash('sha256'),
crypto = require('crypto'),
path = require('path'),
slash = require('slash'),
lineBreak = '\n';

@@ -18,2 +19,3 @@

var exclude = [].concat(options.exclude || []);
var hasher = crypto.createHash('sha256');

@@ -45,3 +47,3 @@ if (options.timestamp) {

contents.push(encodeURI(file.relative));
contents.push(encodeURI(slash(file.relative)));

@@ -48,0 +50,0 @@ if (options.hash) {

{
"name": "gulp-manifest",
"version": "0.0.4",
"version": "0.0.5",
"description": "Generate HTML5 Cache Manifest files",

@@ -30,4 +30,5 @@ "main": "index.js",

"through": "~2.3.4",
"gulp-util": "~2.2.6"
"gulp-util": "~2.2.6",
"slash": "^0.1.1"
}
}

@@ -6,3 +6,3 @@ # gulp-manifest

Visit the [Appcache Facts](http://appcachefacts.info/) for more information on Cache Manifest files.
Visit the [HTML 5 Guide to AppCache](http://www.html5rocks.com/en/tutorials/appcache/beginner/) for more information on Cache Manifest files.

@@ -9,0 +9,0 @@ ## Usage

@@ -50,2 +50,23 @@ var fs = require('fs'),

it('should work with Windows OS file system', function(done) {
var stream = manifestPlugin({
hash: false
});
stream.on('data', function(data) {
var contents = data.contents.toString();
contents.should.contain('fixture/hello.js');
});
stream.once('end', done);
stream.write(new gutil.File({
path: path.resolve('test\\fixture\\hello.js'),
cwd: path.resolve('test/'),
base: path.resolve('test/'),
contents: new Buffer('notimportant')
}));
stream.end();
});
it('Should exclude multiple files', function(done) {

@@ -68,2 +89,19 @@ var stream = manifestPlugin({

});
it('Should work with hash multiple times', function (done) {
var pending = 2;
function generateWithHash() {
var stream = manifestPlugin({ hash: true });
stream.on('data', function (data) {
data.contents.toString().should.contain('# hash: ');
});
stream.once('end', function () {
if (--pending <= 0) done();
});
fakeFiles.forEach(stream.write.bind(stream));
stream.end();
}
generateWithHash();
generateWithHash();
});
});
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