
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Copies ('renders') files from srcdir -> dstdir, with transformation & filtering, with a promised interface.
Simple convenience function to help copy a source directory to a destinaton directory, with file contents being transformed.
Provides a promise based interface, that provides two things -
This is the raison d'etre for the library. Since different tools use
different template engines, render-dir does not force an opinion.
The transformer() is invoked with the content of each file,
allowing the user to provide the actual transformation logic,
while getting a convenient promised interface to fs book-keeping
NOTE: We strongly prefer local installations versus global. Prevents most if not all occurances of "works-on-my-machine" symptom.
npm install render-dir
yarn install render-dir
renderDir is implmented as a simple API, but also exposed as an CLI, with the callback being provided in a javascript file, with the default export.
const renderDir = require('render-dir');
renderDir(srcdir: string, dstdir: string, transformer?: (fdesc: FileDescriptor) => FileDescriptor) => Promise<{}>
Usage: render-dir [options] <srcdir> <dstdir>
Applies transform & copies files from 'srcdir' -> 'dstdir', with filtering
Options:
-V, --version output the version number
-x, --transform <transform> file with default exported function, used to transform file/content
-h, --help output usage information
npx render-dir -x ./transform.js /src/template/dir/ /dst/dir/rendered/
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Bugs, PRs, comments, suggestions welcomed!
FAQs
Copies ('renders') files from srcdir -> dstdir, with transformation & filtering, with a promised interface.
The npm package render-dir receives a total of 0 weekly downloads. As such, render-dir popularity was classified as not popular.
We found that render-dir demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.