joeferner / node-java

Bridge API to connect with existing Java APIs.
MIT License
1.88k stars 283 forks source link

Create Build directory if the directory does not exist #560

Open hinkley-dev opened 2 years ago

hinkley-dev commented 2 years ago

I'd like to add

   if (!fs.existsSync(__dirname + '/build')){
    fs.mkdirSync(__dirname + '/build');
}

above line 22 of postInstall.js. When creating the file ..(__dirname, './build/jvm_dll_path.json) I get an error because the empty directory does not exists.

I'd like to create a PR to add this at it should not affect any other changes and will fix the case where the build directory does not exist when using npm to install.