
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Go make something, dang it.
FAQs
Get a place to put your build.
The npm package build-dir receives a total of 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.