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

blake

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blake - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

30

lib/copy.js

@@ -0,1 +1,2 @@

// copy - copy source directory and its subtree to target directory

@@ -5,16 +6,35 @@

, resolve = require('path').resolve
, Stream = require('stream').Stream
module.exports = function (source, target, callback) {
var reader = fstream.Reader({ path: source })
var reader = fstream.Reader({ path: source, filter: filter })
, writer = fstream.Writer({ path: target, type: 'Directory' })
, stream = new Stream()
reader.on('error', function (err) {
writer.emit('error', err)
stream.emit('error', err)
})
reader.on('entry', function (entry) {
if (entry.type === 'File') {
stream.emit('data', entry.basename + '\n')
}
})
writer.on('error', function (err) {
stream.emit('error', err)
})
writer.on('end', function () {
stream.emit('end')
if (callback) callback()
})
return reader.pipe(writer)
reader.pipe(writer)
return stream
}
function filter (entry) {
return !entry.basename.match(/^\./)
}

2

package.json
{
"name": "blake",
"description": "Simple, blog aware infrastructure to generate static sites",
"version": "0.6.3",
"version": "0.6.4",
"homepage": "http://michaelnisi.github.com/blake/",

@@ -6,0 +6,0 @@ "repository": {

@@ -43,8 +43,6 @@ # blake - generate site

, cop = require('cop')
, copy = require('../lib/copy.js')
, copy = require('blake/lib/copy.js')
copy(join(source, 'resources'), target)
.on('error', function (err) {
console.error(err)
})
.on('error', console.error)
.on('end', function () {

@@ -51,0 +49,0 @@ new Reader(props)

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