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

generify

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generify - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

test/fixture-notification.js

22

generify.js

@@ -14,3 +14,3 @@ #!/usr/bin/env node

function generify (source, dest, data, done) {
function generify (source, dest, data, onFile, done) {
var count = 1 // the walker counts as 1

@@ -22,3 +22,7 @@ var keys = Object.keys(data)

if (!done) done = function () {}
if (typeof done !== 'function') {
done = onFile
onFile = function () {}
}
if (!data) data = {}

@@ -37,2 +41,3 @@

copyAndReplace(file, destFile)
onFile(relativePath)
})

@@ -84,5 +89,16 @@ })

generify(source, dest, json)
generify(source, dest, json, onData, done)
function onData (file) {
console.log('> writing ' + file)
}
function done (err) {
if (err) {
throw err
}
console.log('> completed ' + dest)
}
}
if (require.main === module) execute()

2

package.json
{
"name": "generify",
"version": "2.0.0",
"version": "2.1.0",
"description": "A reusable project generator",

@@ -5,0 +5,0 @@ "main": "generify.js",

@@ -16,3 +16,4 @@ # generify  [![Build Status](https://travis-ci.org/mcollina/generify.svg?branch=master)](https://travis-ci.org/mcollina/generify)

generify(source, dest, data, function(err) {
// without notification
generify(source, dest, data, function (err) {
if (err) {

@@ -24,2 +25,17 @@ console.log(err)

})
// with notification
generify(source, dest, data, onData, done)
function onData (file) {
console.log('writing file')
}
function done (err) {
if (err) {
console.log(err)
} else {
console.log('ok!')
}
}
```

@@ -26,0 +42,0 @@

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