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

copy-template-dir

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

copy-template-dir - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

7

index.js

@@ -34,5 +34,7 @@ const maxstache = require('maxstache-stream')

const streams = []
const createdFiles = []
// create a new stream for every file emitted
rs.on('data', function (file) {
createdFiles.push(path.join(outDir, removeUnderscore(file.path)))
streams.push(writeFile(outDir, vars, file))

@@ -44,3 +46,6 @@ })

if (err) return cb(err)
parallel(streams, cb)
parallel(streams, function (err) {
if (err) return cb(err)
cb(null, createdFiles)
})
})

@@ -47,0 +52,0 @@ })

2

package.json
{
"name": "copy-template-dir",
"version": "1.1.0",
"version": "1.2.0",
"description": "High throughput template dir writes",

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

@@ -25,4 +25,5 @@ # copy-template-dir

copy(inDir, outDir, vars, (err) => {
copy(inDir, outDir, vars, (err, createdFiles) => {
if (err) throw err
createdFiles.forEach(filePath => console.log(`Created ${filePath}`))
console.log('done!')

@@ -41,3 +42,4 @@ })

- __vars__: An object with variables that are injected into the template files.
- __cb(err)__: A callback that is called on completion.
- __cb(err, createdFiles)__: A callback that is called on completion, with
paths to created files if there were no errors.

@@ -44,0 +46,0 @@ ## See Also

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