
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Get a place to put your build.
build/<branch>/<version>.npm install build-dir --save
Get it into your program.
const buildDir = require('build-dir');
Get a path to use when writing the build.
buildDir().then((dirPath) => {
console.log('Build directory:', dirPath);
// 'build/master/1.0.0'
});
Get the path that was used for the most recent build.
buildDir.latest().then((dirPath) => {
console.log('Build directory:', dirPath);
});
Set up convenient latest-build and branch-specific latest links.
buildDir.link().then(() => {
console.log('Linking complete.')
// latest-build -> build/<branch>/latest -> build/<branch>/<version>
});
Let us manage the lifecycle steps for you.
buildDir.prepare().then((dir) => {
// Put stuff in here:
console.log('Temp dir:', dir.path);
// ... some time later ...
// Move the temp dir to its permanent home and set up
// latest links.
return dir.finalize();
});
Type: object
Type: string
Default: process.cwd()
The parent directory of the build root.
Type: string
Use the given branch name, instead of asking git.
Type: string
Use the given version, instead of asking build-version.
Same as buildDir(), except the branch defaults to the most recently built branch and version defaults to the most recently built version of the branch.
Takes cwd, branch, and version on the option object.
Within the cwd, writes a symlink at latest-build pointing to build/<branch>/latest and from there to version.
Returns a promise for an object with these fields:
path is a newly created temporary directory for you to write the build to.finalize() moves path to its final location and runs buildDir.link() on it.See our contributing guidelines for more details.
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureGo make something, dang it.
FAQs
Get a place to put your build.
The npm package build-dir receives a total of 21 weekly downloads. As such, build-dir popularity was classified as not popular.
We found that build-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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.