From 4c5773ca586dba9d1a7a62e4013d037260bb598f Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Mon, 14 Mar 2022 09:50:03 -0500 Subject: [PATCH] moved to yarn, updated README and .gitignore --- .gitignore | 2 ++ README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 README.md diff --git a/.gitignore b/.gitignore index 62207ba..a438d13 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /node_modules .DS_Store + +yarn.lock diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f9c707 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# nodeaudio + +## Building + +Clean and build: + + node-gyp rebuild + +There is a custom, prebuilt PortAudio library (libportaudio.dylib) in portaudio/bin that is copied over to the rpath (build/Release) before the actual build. During build, it is dynamically linked to nodeaudio.node (the main binary). This will NOT work (potentially at runtime) unless PortAudio has the correct install path. Run through the steps below if libportaudio.dylib changes: + +Update the install path of PortAudio: + + install_name_tool -id "@loader_path/libportaudio.dylib" libportaudio.dylib + +To see what libraries a Mach-O exe requires: + + otool -L build/Release/nodeAudio.node + +## Publishing + +The publishing config is defined in .npmrc (url and credentials). API_TOKEN is a GitLab token with the api scope. + +As of writing, publishing will fail if there is already a package in the registry. + +### !! NPM vs Yarn +I was unable to figure out how to publish to the private GitLab repo using npm (400 Bad Request). This may just be a bug in npm. For real, this threw me for a loop. I had to switch to Yarn for this reason (v1.22.17). Pulling with npm works fine though (for other repos). + +### TODO +Sign on build \ No newline at end of file -- 2.43.0