New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

copy-template-dir

Package Overview
Dependencies
Maintainers
3
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.2.1 to 1.3.0

9

index.js

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

const maxstache = require('maxstache-stream')
const maxstacheStream = require('maxstache-stream')
const maxstache = require('maxstache')
const parallel = require('run-parallel')

@@ -38,3 +39,3 @@ const eos = require('end-of-stream')

rs.on('data', function (file) {
createdFiles.push(path.join(outDir, removeUnderscore(file.path)))
createdFiles.push(path.join(outDir, maxstache(removeUnderscore(file.path), vars)))
streams.push(writeFile(outDir, vars, file))

@@ -61,3 +62,3 @@ })

const parentDir = file.parentDir
const outFile = path.join(outDir, removeUnderscore(fileName))
const outFile = path.join(outDir, maxstache(removeUnderscore(fileName), vars))

@@ -68,3 +69,3 @@ mkdirp(path.join(outDir, parentDir), function (err) {

const rs = fs.createReadStream(inFile)
const ts = maxstache(vars)
const ts = maxstacheStream(vars)
const ws = fs.createWriteStream(outFile)

@@ -71,0 +72,0 @@

{
"name": "copy-template-dir",
"version": "1.2.1",
"version": "1.3.0",
"description": "High throughput template dir writes",

@@ -23,2 +23,3 @@ "main": "index.js",

"graceful-fs": "^4.1.3",
"maxstache": "^1.0.0",
"maxstache-stream": "^1.0.0",

@@ -25,0 +26,0 @@ "mkdirp": "^0.5.1",

@@ -38,5 +38,7 @@ # copy-template-dir

with a `_` will have it removed when copying. Dotfiles need to be prepended
with a `_`. Files are populated with variables using the `{{varName}}` syntax.
with a `_`. Files and filenames are populated with variables using the
`{{varName}}` syntax.
- __targetDir__: the output directory
- __vars__: An object with variables that are injected into the template files.
- __vars__: An object with variables that are injected into the template files
and file names.
- __cb(err, createdFiles)__: A callback that is called on completion, with

@@ -43,0 +45,0 @@ paths to created files if there were no errors.

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